
05-18-2005, 06:14 AM
|
|
Freshman
|
|
Join Date: Apr 2005
Posts: 48
|
|
Using a Microsoft Access workgroup file with ADO datacontrol object.
|
Hello everyone,
I have a little situation that I need help with urgently. I have a VB6 application that uses a microsoft access database to store all the information. The database has about 5 tables that keep track of various customer transactions etc. Just so that noone can open this access database, I have setup a database password. Noone ever needs to find out or change this password, therefore I have it hard-coded into the application itself. I also have a user called EMPLOYEE and a password for that username. This is the one and the only user thats ever going to access the database therfore, its all hard-coded inside the application. My application uses both ADODB.Recordset objects and ADO datacontrol objects. Everything works fine with the recrodset as I can show the workgroup file in the code like this:
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\somepath\mydb.mdb;" & _
"Jet OLEDB:System Database=MySystem.mdw", _
"myUsername", "myPassword"
However, for the ado datacontrol object (the one that looks like a horizontal scrollbar), I don't know how to indicate what the workgroup file is (MySystem.mdw). Is there a property that I can set for this control to fix this issue? Every time I run the program and go to a datagrid that takes its values from this ADO datacontrol, it crashes with an error saying: Workgroup file is missing or opened by another user.
Not sure if this made much sense but I tried my best.
Please help...
Thanks
|
|