|
-
December 13th, 1999, 11:28 AM
#1
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]
-
December 18th, 1999, 07:39 AM
#2
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
-
December 18th, 1999, 04:46 PM
#3
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.
-
December 21st, 1999, 09:41 AM
#4
Re: VB
;-)
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
-
December 22nd, 1999, 11:39 PM
#5
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
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
|