|
-
Nov 14th, 2000, 12:05 AM
#1
Thread Starter
Dazed Member
Im used to working with DAO and now im trying to
slide over to the ADO side but i cant seem to get
the connection string right. Any suggestions would be
greatly appreciated. I keep seeing
Set connection = CurrentProject.Connection but
CurrentProject is a object off of the Application
object in VBA which i cant access from vb it self
so what do i do?
Option Explicit
Dim connection As New ADODB.connection
Dim fieldcurr As ADODB.Field
Dim ourtables As New ADOX.Table
Dim catcurr As New ADOX.Catalog
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
rs.Open "Account Information"
For Each fieldcurr In rs.Fields
Debug.Print fieldcurr.Name
rs.MoveNext
Next fieldcurr
End Sub
Private Sub Form_Load()
connection.Open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = C:\SoilTicketdb.mdb"
-
Nov 14th, 2000, 05:44 AM
#2
Lively Member
You could make a hop there :
http://msdn.microsoft.com/library/ps...k/mdap99m7.htm
for more info on using ADO with various providers
and there :
http://msdn.microsoft.com/library/ps...k/mdap2h43.htm
for more info on using ADO with MsJet
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|