PDA

View Full Version : Connecting to Access Database using a Database Password


sohnee
06-04-2003, 05:53 AM
Hello,

What do I need to add to the following statement in order to connect using a database password -

I have tried 'pwd=password' to no avail!

<%
private mconConnection

function fnOpenDatabase()

dim conConnection

Set conConnection = Server.CreateObject("ADODB.Connection")

conConnection.Open("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("\odford\db\odford.mdb") & ";" & _
"Persist Security Info=False")

set fnOpenDatabase = conConnection

end function

%>

sohnee
06-04-2003, 06:03 AM
I have worked it out and thought it would be useful for others...

If you have a Database Password, you add the following:

Jet OLEDB:Database Password=password