Error 3029 When Trying to Create Workspace

P

Pierre Doré

Original application in MS Access 2002. When migrated to A2007 (still a .mdb
database, I had to change the connectivity codes from ODBC to ADO. But now I
get this error message:

Not a vilad account name or password. [3029]

I know the account is good as I am in the database in design mode with this
account. Here is the code in question:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim cmd As ADODB.Command
Dim sCN As String

Set cn = New ADODB.Connection
Set cmd = New ADODB.Command
Set rs = New ADODB.Recordset

cn.ConnectionString = "Data Source='ACIIS';" & _
"User ID='aciis_admin';Password='xxxxxxx';"
cn.Open

'Error generates from this line of code below:

Set gWorkspace = CreateWorkspace("NewAccessWorkspace", "aciis_admin",
"aciis8adm", dbUseJet)

Note that this workspace was define in a seperate module:
Public gWorkspace As Workspace

Any help very much appriciated.
Thx
Pierre
 
P

Piet Linden

Original application in MS Access 2002. When migrated to A2007 (still a .mdb
database, I had to change the connectivity codes from ODBC to ADO.  Butnow I
get this error message:

Not a vilad account name or password. [3029]

I know the account is good as I am in the database in design mode with this
account.  Here is the code in question:

  Dim cn As ADODB.Connection
  Dim rs As ADODB.Recordset
  Dim cmd As ADODB.Command
  Dim sCN As String

  Set cn = New ADODB.Connection
  Set cmd = New ADODB.Command
  Set rs = New ADODB.Recordset

  cn.ConnectionString = "Data Source='ACIIS';" & _
  "User ID='aciis_admin';Password='xxxxxxx';"
cn.Open

'Error generates from this line of code below:

 Set gWorkspace = CreateWorkspace("NewAccessWorkspace", "aciis_admin",
"aciis8adm", dbUseJet)

Note that this workspace was define in a seperate module:
Public gWorkspace As Workspace

Any help very much appriciated.
Thx
Pierre

Well, of course trying to refer to a DAO Workspace in an ADO context
is going to fail. There's no such thing as a Workspace in the ADO
hierarchy. The closest thing to it is an ADO Connection.

Check out Michael Kaplan's notes on DAO and ADO objects
www.trigeminal.com

Might be old, but it's on the money.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top