Click to See Complete Forum and Search --> : Database Access


Drew
April 5th, 2001, 12:02 AM
I want to burn my program on a Cd. It access a data base that has user names and passwords. The database is in the same folder as the program. I set the correct jet and the connection is just the database file name. I put this code in the form main of the logon form.
Dim dbName As String
dbName = App.Path & "\NameandPassords.mdb"
When I run the program it gives me a message box showing the path to the database and that it can't access it. The path is like C:program files/MicrosoftVisualStudio/VB98....etc but I just have the database name in the connection box. I can't figure out what is wrong. Also when I burn the program it gives me the same error and how can I make the program so I can still enter data into the database after I burn it?

shree
April 5th, 2001, 06:46 AM
You must have used

dbName = App.Path & "\NameandPassords.mdb"
Data1.DatabaseName = dbName

So, keep the DatabaseName field of the data control empty.
Now, it should work

And while burning the CD, don't do it in the root, instead, keep it in a folder, I mean, instead wo writing the program to f:\, put it in a folder, say F:\MyProgram. I got the path not found error when I burned my program in the root.

One problem with burning the names and passwords database to the CD is that you will not be able to add to these.