Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Question
Message
From
21/05/2002 16:35:45
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Simple Question
Miscellaneous
Thread ID:
00659583
Message ID:
00659583
Views:
54
I have a very simple question. I have a form with a textbox and a command button. I am trying to connect to an Access Database by clicking the command button and show the contents of one of the fields in table1 of the mdb. So far I have the following code in the "click" event of the command button but it keeps erroring out saying "work.mdb does not exist". (It does!!)
Any help would be greatly appreciated.
Dim connDatabase
Set connDatabase = CreateObject("ADOCE.Connection.3.0")

connDatabase.ConnectionString = " \work.mdb"
connDatabase.Open

connDatabase.Close
Set connDatabase = Nothing
I got this code straight out of the help file, but I don't understand why I don't have to specify the drive and path of the mdb. I put it at the drive root, but that didn't help.

Also, what would the syntax be to display the contents of table1.name in the text box. Thanks in advance.
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson
Next
Reply
Map
View

Click here to load this message in the networking platform