Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


DAO & ADO Run-time error 3028

DAO & ADO Run-time error 3028

DAO & ADO Run-time error 3028

Can anyone tell me what's wrong/missing with my coding please? Every time this runs, program terminates with following error message.
Thanks in advance.

  Run-time error 3028
  Can't start your application. The workgroup information file is missing    or opened exclusively by another user.

'Code to create an Access(97) table using DAO and ADO to open it

  Dim SysDB As Database
  Dim SysTB As TableDef
  Dim SysFD As Field
  Set SysDB = CreateDatabase("C:\test.MDB", dbLangGeneral & ";UserID=Admin;pwd=pwd")

  Set SysTB = SysDB.CreateTableDef("Tb1")
  With SysTB
      .Fields.Append .CreateField("Field1", dbText, 8)
      .Fields("Field_FormID").AllowZeroLength = True
  End With
  SysDB.TableDefs.Append SysTB
  Dim cn As ADODB.Connection
  Set cn = New ADODB.Connection
  cn.ConnectionString = & _
      "Provider=Microsoft.Jet.OLEDB.3.51;" & _
      "Persist Security Info=False;" & _
      "Data Source=c:\Test.mdb;" & _
  Dim rs As ADODB.Recordset
  Set rs = New ADODB.Recordset
  rs.Open "Tb1", cn, adOpenKeyset, adLockOptimistic, adCmdTable

  Set frmMain.Adodc1.Recordset = rs

RE: DAO & ADO Run-time error 3028

Dear NW,

where exactly does the error occur, try going through step by step. (using F8)

I suppose it occurs when you try to open the adodb.connection.

Createdatabase gives back an open database object, could be by default opened exclusivly. So when you try to open another connection to the same object, your error could appear.

perhaps you have to close your db  just after creating  it.


regards Astrid

RE: DAO & ADO Run-time error 3028

Dear Sawatzky,
You were right. Error occurs when try to open the connection. I also tried with closing DBF with negative results. I can use the same coding without a User ID & a password with no errors. Do I have the correct syntax? or will it looking at a workgroup file only when there's a usid & pwd? How I can I use the workgroup file in shared more?
Thanks for your time.

RE: DAO & ADO Run-time error 3028

Dear NW,

I am not sure what the option 'persist security info' is for, but I would try to leave this option out.

I am not sure about workgroup, so I am just guessing.


regards Astrid

RE: DAO & ADO Run-time error 3028

I don't know whether I'm reading this wrong but are you trying to create the database with the password "pwd" and then trying to create a connection to it with the password "MMG" ?

RE: DAO & ADO Run-time error 3028

DLLS required for Buiding an VB application so that it can be deployed in remote machine.

we are getting ADO error if go by default setting.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close