PDA

Click to See Complete Forum and Search --> : Data Control and Access 2-Access 97


magi
Jun 16th, 1999, 01:48 AM
How can I bind a data control(in VB 6) to Access 2 and Access 97 (password protected) database?
I use the fallowing statement
DataCtl.databaseName = GB_Database (path and name of file.mdb)
What have I to change?
Can someone help me??

ScottF
Jun 16th, 1999, 04:27 AM
I'm not sure about VB6 but in VB5 I'm using both data control and DOA. To make sure my datacontrol will open the databasrname I first use this statement before I set up a datacontrol. Something like this:
dim dbs as database
Set dbs = OpenDatabase(Database Path, False, False, "MS Access;pwd=passwordname")
dtaName.DatabaseName = "database Path"
dtaName.RecordSource = "tablename"
dtaName.Refresh