-
VB
I'm trying to write a program that opens up an access database and modifies the values in that db. I've successfully created the database and and filled a table with the fields that I need but I haven't been able to fill the db with the data(records) that I need. What I need to know is should I be using DAO for this? or can I do it using opencurrentdatabase etc??? Any help or direction would be appreciated. [email protected]
-
Re: VB
You can do it with both ways. Select one and I'll guide you how to do it...
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
-
Re: VB
Thank you. But I figured it out. I made a really simple mistake. I forgot to set Dao as one of my libraries.
-
Re: VB
;-)
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
-
Re: VB
I would use ADO instead of DAO. Something like this:
Dim rst as ADODB.Recordset
Dim con as ADODB.Connection
set con = new ADODB.Connection
con.ConnectionString = "DRIVER=(Microsoft Access Driver (*.mdb)); DBQ=databasename.mdb;DefaultDir=" & App.path & ";UID=admin..."
con.Open
rst.Open "select * from table", con
There really are any number of ways to use it; i.e. thru the Command obj, the Connection obj or even the Recordset obj. I believe the piece of code above should work.
good luck.
Lee Barnard
Atlanta, GA