hemant
hemant

Reputation: 564

connecting to Access in vb6

I am trying to connect to database with password, but i m getting an Error This is my Connection String

cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Database\HMS.mdb;" _
& "Password=admin;"

I am Getting an Error : Cannot Start Your Application. Workgroup Information File is Missing or Opened Exclusively by the another user.

Upvotes: 2

Views: 8590

Answers (1)

Himanshu
Himanshu

Reputation: 32602

Try this connection string:

cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & App.Path & "\Database\HMS.mdb;" _
& "Jet OLEDB:Database Password=admin;"

Upvotes: 2

Related Questions