Drew
March 20th, 2001, 11:55 PM
I am making a Database and the database file is in the same folder as all of the forms. Where is the properties box do I put the path to the file of the data base?
|
Click to See Complete Forum and Search --> : Database Drew March 20th, 2001, 11:55 PM I am making a Database and the database file is in the same folder as all of the forms. Where is the properties box do I put the path to the file of the data base? Iouri March 21st, 2001, 07:37 AM In the properties you can enter the full path of the database. But it is much better to assign path in the run time using App.Path & "\mydb.mdb". That will help you if you install this application to the different folder on the user machine. Iouri Boutchkine iouri@hotsheet.com Drew March 21st, 2001, 10:55 AM Where in the properties do I put the path? I am putting the data base in the same folder as the VB program so where would I put the code you suggested? I noticed you had your Email address on your reply, can I email you a sequential file program that I am have problems with. If I post all the code it will just be a mess on the forum. I can send you all the forms so you can compile it. The problem is only in the main form. I always give 10 for any help I get. Iouri March 21st, 2001, 12:00 PM If you are using ADODC then that is the place where you enter db path (to the adodc properties). If you don't use adodc then the only place where you define the db path is the connection string Dim sConn As String Dim cn as ADODB.Connection dim sDBName as String Set cn = New ADODB.Connection sDBNAme = App.Path & "\YourDB.mdb" sConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & sDBName & ";Persist Security Info=False" cn.ConnectionString = sConn cn.Open sConn Iouri Boutchkine iouri@hotsheet.com codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |