Jet CreateWorkspace problems in VB 4

Jet CreateWorkspace problems in VB 4

Post by Brad Welc » Sat, 29 Mar 1997 04:00:00



I am trying to create a secure Jet Workspace.  My OS is Win95 however I'm
programming in VB4 - 16bit for Access 2.0  (user has Win3.1).

The problem is either VB or my program is not correctly validating the user
ID and password against the system.mda.  I can start Access and login with
same user &  password using what I think is the same system.mda.   I've
even tried the sample app VISDATA to connect to the system.mda and attempt
to create a workspace, and that has the same problem.

Can someone tell me what I might be doing wrong or what to look for.

My syntax is something like
==========================
Sub  Login(User,Pswd)
Dim ws as workspace

' The .Ini specifies the SystemDB path

DBEngine.IniPath = "C:\msacc20.ini"
Set ws = DBEngine.CreateWorkspace("MyWs",User, Pswd)

=============================
I get the run-time error message 3029 : Not a valid account name or
password

- Brad

 
 
 

Jet CreateWorkspace problems in VB 4

Post by Edward Yachimiak Jr » Sun, 30 Mar 1997 04:00:00



> I am trying to create a secure Jet Workspace.  My OS is Win95 however I'm
> programming in VB4 - 16bit for Access 2.0  (user has Win3.1).

> The problem is either VB or my program is not correctly validating the user
> ID and password against the system.mda.  I can start Access and login with
> same user &  password using what I think is the same system.mda.   I've
> even tried the sample app VISDATA to connect to the system.mda and attempt
> to create a workspace, and that has the same problem.

> Can someone tell me what I might be doing wrong or what to look for.

> My syntax is something like
> ==========================
> Sub  Login(User,Pswd)
> Dim ws as workspace

> ' The .Ini specifies the SystemDB path

> DBEngine.IniPath = "C:\msacc20.ini"
> Set ws = DBEngine.CreateWorkspace("MyWs",User, Pswd)

> =============================
> I get the run-time error message 3029 : Not a valid account name or
> password

> - Brad

I think your problem is that you need to set your Tools/References to
include the VB DOA 2.5/3.0 Compatibility Library.

My problem is a little more frustrating, I think.

Here's my code:

Private Sub Form_Load()

    Dim MyWorkSpace As Workspace, MyDB As Database, MyRecordset As
Snapshot, MySQL As String

    ' The old VB3 way
    'SetDataAccessOption 1, "E:\MYAPPS\MYPROGRAM\MYPROGRAM.INI"
    'SetDefaultWorkspace "myusername", "mypassword"

    ' The new improved VB4 way
    DBEngine.DefaultUser = "myusername"
    DBEngine.DefaultPassword = "mypassword"
    DBEngine.IniPath = "E:\MYAPPS\MYPROGRAM\MYPROGRAM.INI"

    Set MyWorkSpace = DBEngine.Workspaces(0)

I get the following error on opening the Workspace:

Run-time Error '3028'

Can't start your application.  The system database is missing or is
opened exclusively by another user.

My MYPROGRAM.INI file looks like this:

[Options]
SystemDB=E:\MYAPPS\MYPROGRAM\system.mda
UtilityDB=E:\MYAPPS\MYPROGRAM\utility.mda

Both files are where they should be, so the system database is NOT
missing; and there doesn't appear to be anybody else sitting next to me,
so what gives?

When I rem out the DefaultUser and DefaultPassword lines I get the
following message:

Run-time Error '3112'

Record(s) can't be read.  No Read Data permission on 'MyTableName'.

This is the same error I get when I try to open the 'MyTableName' table
using the Data Manager Add-in.

Obviously something is going wrong here.  Any ideas?

Ed Yachimiak

 
 
 

1. Converting JET 3.51(97) To Jet 4.0(2000) Using DAO In VB 5

Hello All

I have fourquestions in relation to JET, DAO and Visual Basic 5:

1) In a Visual Basic 5 project which uses DAO to get at an ACCESS 97
database, is it possible to upgrade the database to Access 2000 without
changing the program (i.e., just update the JET DLL's or similar). Crystal
reports and bound controls feature heavily in the project

2) If the answer to question 1 is "Yes", then which DLL's need to change?

3) Is changing the database from ACCESS 97 to ACCESS 2000 going to give me
any benefit in terms of robustness or quickness?

4) My limited experience in using ACCESS 2000 in relation to ACCESS 97
databases has shown that the ACCESS 2000 databases are often upwards of 30%
larger than an identical ACCESS 97 database. Is this normal?

Thanks for any advice in relation to these queries.

bye ... peteb

2. call DATE() & DAYS() Sql functions from UDF

3. Createworkspace problem in VB4-16bit - (Help)

4. restore to different database

5. CreateWorkspace problem

6. dbase: strange effect with PRIVATE

7. CreateWorkspace - security problem in VB4

8. SQL Links or ODBC for remote SQL servers?

9. Problems with CreateWorkspace() method

10. Createworkspace problem in VB4 (Help)

11. Jet 4.0 & VB 5 Problem

12. Jet Problems with VB and msAcces database

13. Problems with Using Jet 3.5 and VB