need to access database from corel draw error 3112

This is the code. It connects fine to the database - but when i try to open the table I get Error 3112. How can I give myself "permission"?

Dim objConn As New ADODB.Connection
Dim ars As New ADODB.Recordset
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\er\database2.mdb;"
objConnState = objConn.State
ars.Open "SELECT SkuCache.ImageID FROM OrderTable order by item;", objConn, adOpenKeyset, adLockOptimistic



Set ars = Nothing
Set objConn = Nothing
End Sub
Who is Participating?
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
Not sure, but as a guess, I would say you need a User name and password that will allow you read access to the data, (So please contact the person in charge of this data, or other users who can connect to this data) ...this UN and PW will be coded into your connection string something roughly like this:

objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\er\database2.mdb;" & UserID:="YourUserID", Password:="YourPassword"

See here for more info:

eg252Author Commented:
the message now is "the workgroup information is missing or used exclusively by another user.."

I made a copy of the system.mdw and put that in and got the same message

I can open the database with access with a password.. and there is no security or locks..

I made a brand new database with one table
eg252Author Commented:
I figured it out! thank you for your help
eg252Author Commented:
wasnt the complete solution - but pointed me in the right direction.. I posted the answer that did work for me..
Jeffrey CoachmanMIS LiasonCommented:
<wasnt the complete solution - but pointed me in the right direction.>
...that was the point, ...just to get you going...

Glad I could help...
All Courses

From novice to tech pro — start learning today.