Library tutorials & articles
ADO Data Control
Introduction
You might say the data control is a VB orphan; some developers refuse to even use it. Why? They find it limiting. On the other hand, I believe in using the least effort possible. If a simple control will do the trick, I’m all for it. In this series of articles we’re going to review database programming from the ground up. The data control is a good place to start. Once you know its assets and limitations, you can decide for yourself whether the data control is for you.
Ask a group of VB developers how they feel about the data control, and you’ll get a variety of responses. Some use the control quite a bit while others never use it at all. Why the discrepancy between users? Those who don’t use it tell us that the control isn’t all that flexible. It seems the control has a hard time growing with an application. Frankly, the majority of my applications never come back to haunt me like this. When they do, it’s for added functionality. Rarely do I actually have to rewrite existing features. I’m told I’m part of a small minority. For what it’s worth, I like the data control--especially now that version 6.0 supports ADO.
Related articles
Related discussion
-
Run-time error '91'
by converter2009 (1 replies)
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
Private Sub Form_Load()
dcPekerja.Visible = False
dcPekerja.ConnectionString = App.Path & "\db1.mdb"
dcPekerja.RecordSource = "Select * From Table1;"
End Sub
All you have to add is a tiny little "\" and there you have it. I suppose that you already figured it out by now but if not hope it helps. Also make sure that the database is in the same directory as the ".exe" or ".vbp"
Have fun coding!
Private Sub Form_Load()
dcPekerja.Visible = False
dcPekerja.ConnectionString = App.Path + "db1.mdb"
dcPekerja.RecordSource = "Select * from Table1;"
End Sub
You Should Have
Private Sub Form_Load()
dcPekerja.Visible = False
dcPekerja.ConnectionString = "\\db1.mdb"
dcPekerja.RecordSource = "Select * From Table1;"
End Sub
Or not
Well i supose you do have the database in the same directory with the application on the other computer
i'm using adodc to connect to access
but i'm having problem when i use the application on other pc...
it say that it cant found the database file...
i use this coding... but still the error is there...
Private Sub Form_Load()
dcPekerja.Visible = False
dcPekerja.ConnectionString = App.Path + "db1.mdb"
dcPekerja.RecordSource = "Select * from Table1;"
End Sub
i also try this code...but nothing happens...
Private Sub Form_Load()
dcPekerja.Visible = False
dcPekerja.ConnectionString = App.Path & "db1.mdb"
dcPekerja.RecordSource = "Select * from Table1;"
End Sub
dcPekerja => adodc
Gave me insight, thanks
IMHO - The Data Control's sole usefullnes is when you literally want to scroll the data, one record at a time.javascript:smilie('
')
frown
I find it MUCH easier to roll my own ADO RS control that will search for the resocrd(s) I need...javascript:smilie('
stick out tongue javascript:smilie('
wink
This control should ONLY be used by total DB Newbies!!! (IMHO)javascript:smilie('
eek!
This thread is for discussions of ADO Data Control.