Re Data Control with ADO msjet 3.6 Libaray 
Author Message
 Re Data Control with ADO msjet 3.6 Libaray

Can anybody help I am trying to use a Data Control to load a DB from Access
2000 (DAO 3.6 Object Library). When I try to load the DB in to the Data
Control I get the message (Couldn't use `C:\VB Work\VB6\VB6
Projects\Lac_DataForm1\LAC1.mdb`;file already in use.). The code below is
now I am trying load the DB.

  Dim ws As Workspace
  Dim Mdb As Database
  Dim g_ds_members As Recordset

 ' Create Microsoft Jet Workspace object.
    Set ws = CreateWorkspace("", "admin", "", dbUseJet)

    ' Initialise the database and dynaset object.
    Set Mdb = ws.OpenDatabase(App.Path & "\LAC1.mdb", True)
    frmMembers!dc_members.DatabaseName = App.Path & "\LAC1.mdb"
    Set g_ds_members = Mdb.OpenRecordset("SELECT * from members")

Thanks
 Rick Jackson




Sat, 13 Apr 2002 03:00:00 GMT
 Re Data Control with ADO msjet 3.6 Libaray

you probably already have the mdb file open in another application..
it may be that you a copy of your application still residing in memory -
make sure they are all killed before re-starting


Quote:
>Can anybody help I am trying to use a Data Control to load a DB from Access
>2000 (DAO 3.6 Object Library). When I try to load the DB in to the Data
>Control I get the message (Couldn't use `C:\VB Work\VB6\VB6
>Projects\Lac_DataForm1\LAC1.mdb`;file already in use.). The code below is
>now I am trying load the DB.

>  Dim ws As Workspace
>  Dim Mdb As Database
>  Dim g_ds_members As Recordset

> ' Create Microsoft Jet Workspace object.
>    Set ws = CreateWorkspace("", "admin", "", dbUseJet)

>    ' Initialise the database and dynaset object.
>    Set Mdb = ws.OpenDatabase(App.Path & "\LAC1.mdb", True)
>    frmMembers!dc_members.DatabaseName = App.Path & "\LAC1.mdb"
>    Set g_ds_members = Mdb.OpenRecordset("SELECT * from members")

>Thanks
> Rick Jackson





Sun, 14 Apr 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. DAO 3.6 data control on '98

2. DAO 3.6 DAta Control wont refresh

3. Data Control with DAO 3.6

4. Data Controls and DAO 3.6

5. PRB: Using DAO 3.6 with VB Data control

6. DAO 3.6 and Data Controls - Class not registered

7. Data control and DAO 3.6

8. DAO 3.6 and Data Control

9. DAO 3.6 and data controls

10. DAO 3.6, Data controls, Passwords, RT 3112

11. strange data control behaviour with DAO 3.6 and SQL server

12. Data Controls and DAO 3.6


 
Powered by phpBB® Forum Software