sciber_dude
asked on
Simple one - ODBC connection file - Database security.
This is a simple question and i feel pretty ridiculous to ask! But here it is anyway, coz i feel i have a mind block today.
* I have an Access Database
* I opened it exclusively
* Selected Tools >> Security >> Set database password
* Typed a new password "xyz" and retyped new password "xyz"
Then I edited my connection file to this
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~
strDataPath = server.MapPath("database.m db")
strConnectString = "Provider=Microsoft.Jet.OL EDB.4.0;"_
& " Data Source= " & strDataPath & ";"_
& " Mode=Share Deny None;User Id=admin;PASSWORD=xyz;"
if not IsObject("conn") then
set conn=Server.CreateObject(" ADODB.Conn ection")
conn.ConnectionTimeout = 15
conn.CommandTimeout = 10
conn.Mode = 3 'adModeReadWrite
if conn.state = 0 then
conn.Open strConnectString
end if
end if
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~
This is the error i got:-
Microsoft JET Database Engine (0x80040E4D)
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
Should i have created a workgroup? What am i missing?
* I have an Access Database
* I opened it exclusively
* Selected Tools >> Security >> Set database password
* Typed a new password "xyz" and retyped new password "xyz"
Then I edited my connection file to this
~~~~~~~~~~~~~~~~~~~~~~~~~~
strDataPath = server.MapPath("database.m
strConnectString = "Provider=Microsoft.Jet.OL
& " Data Source= " & strDataPath & ";"_
& " Mode=Share Deny None;User Id=admin;PASSWORD=xyz;"
if not IsObject("conn") then
set conn=Server.CreateObject("
conn.ConnectionTimeout = 15
conn.CommandTimeout = 10
conn.Mode = 3 'adModeReadWrite
if conn.state = 0 then
conn.Open strConnectString
end if
end if
~~~~~~~~~~~~~~~~~~~~~~~~~~
This is the error i got:-
Microsoft JET Database Engine (0x80040E4D)
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
Should i have created a workgroup? What am i missing?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@ brgivens -
Sorry for not responding to this question for so long. There were some issues here and I did not have access to these files (Murphy's Law). My permissions will be reinstated on Monday. Will check it and let you know.
:) SD
Sorry for not responding to this question for so long. There were some issues here and I did not have access to these files (Murphy's Law). My permissions will be reinstated on Monday. Will check it and let you know.
:) SD
ASKER
I want my access database to be password protected.
What do i do and How do i change my code?
A step-by-step account is preferable coz i got a mind-block today. :(
SD