Workspace locked in Access/VisualBasic 
Author Message
 Workspace locked in Access/VisualBasic

Im running Visual Basic 4.0 on Windows 95 system. The data base is
running in Acess 7.0.
My database has a security, it belongs to a workspace I created.

I use the next code when I loas the first Form in the project

Dim WSP As Workspace

DBEngine.IniPath = "HKEY_CURRENT_USER\Software\VB and VBA Program
Settings\peopleci"

(txtLoginName and txtPassword are textboxes)

  DBEngine.DefaultUser = txtLoginName.Text

DBEngine.DefaultPassword = txtPassword.Text

  Set WSP = DBEngine.CreateWorkspace("Peopleci", txtLoginName.Text,
txtPassword.Text)

  Set gwsMainWS = WSP

  DBEngine.Workspaces.Append gwsMainWS

   Set gdbCurrentDB = gwsMainWS.OpenDatabase(sDatabaseName, True, False,
SCONNECT)

   ..

    Exit Sub

It goes well in visual Basic 4.0

If I try to open the aplication in Visual Basic 5.0 the error is in the
code :

Set WSP = DBEngine.CreateWorkspace("Peopleci", txtLoginName.Text,
txtPassword.Text)

and the message is :

It is impossible to iniciate the application. The workspaces
information file is not found or it is open for another user.
The contradictory thing is that if i create a new workspace it runs
perfectly.

If I open the workspace I created with the example application VISDATA I
can work without problems.

Can anyone help me ?



Thu, 31 Aug 2000 03:00:00 GMT  
 Workspace locked in Access/VisualBasic

You are probably referring to two different workgroup files. Your VB5 is
probably looking for SYSTEM.MDW, which is most likely under SYSTEM subdirectory
and which path you should specify to get the thing working.
HTH, Bill, MCP.



Sat, 02 Sep 2000 03:00:00 GMT  
 Workspace locked in Access/VisualBasic

Maybe, the Database ist opened exclusive or opend in single-user mode. You
have / can change these options by your programm
--


*************************************
logic systems GmbH
Universit?tsstr. 142
D-44799 Bochum
Germany
Hannover Messe Industrie Halle 18 Stand M12
*************************************
http://www.logicsystems.de



Quote:
> Im running Visual Basic 4.0 on Windows 95 system. The data base is
> running in Acess 7.0.
> My database has a security, it belongs to a workspace I created.

> I use the next code when I loas the first Form in the project

> Dim WSP As Workspace

> DBEngine.IniPath = "HKEY_CURRENT_USER\Software\VB and VBA Program
> Settings\peopleci"

> (txtLoginName and txtPassword are textboxes)

>   DBEngine.DefaultUser = txtLoginName.Text

> DBEngine.DefaultPassword = txtPassword.Text

>   Set WSP = DBEngine.CreateWorkspace("Peopleci", txtLoginName.Text,
> txtPassword.Text)

>   Set gwsMainWS = WSP

>   DBEngine.Workspaces.Append gwsMainWS

>    Set gdbCurrentDB = gwsMainWS.OpenDatabase(sDatabaseName, True, False,
> SCONNECT)

>    ..

>     Exit Sub

> It goes well in visual Basic 4.0

> If I try to open the aplication in Visual Basic 5.0 the error is in the
> code :

> Set WSP = DBEngine.CreateWorkspace("Peopleci", txtLoginName.Text,
> txtPassword.Text)

> and the message is :

> It is impossible to iniciate the application. The workspaces
> information file is not found or it is open for another user.
> The contradictory thing is that if i create a new workspace it runs
> perfectly.

> If I open the workspace I created with the example application VISDATA I
> can work without problems.

> Can anyone help me ?



Wed, 06 Sep 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Transactions/Workspaces/Recordlocks

2. Custom Locking code for Database Locked in VB4 with Access 2.0 - HELPPPPPP

3. Access DB + VB6 Passwords in Workspace

4. Accessing workspace objects in Learning Edition 5.0

5. Access Workgroups/Workspace.

6. Newbie in distress - Access 2000 <- 97, Workspaces

7. VisualBasic Form and Access

8. Reference to VisualBasic for use in Word / Excel /Access

9. mysql access with VisualBasic?

10. Accessing I/O ports in VisualBASIC 5.

11. How to do Parallel Port Access in ECP mode using VisualBasic

12. Help! accessing functions in C++ DLL from VisualBasic

 

 
Powered by phpBB® Forum Software