Click to See Complete Forum and Search --> : Asp connection string (MS Access)


WoG
05-19-2004, 01:29 PM
I am having problems connecting to a MS Access DB that is on a network server (not local) through ADO/ASP.

Here is the latest version of my connection string:
'set connmajors = server.CreateObject("ADODB.Connection")
'connmajors.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\server\accessdb.mdb; Uid=***; Pwd=***;"

This does not work. I want to use a DSNless connection, but there are so many examples of different types of those- I am a bit confused. Do I even need the username/password?

My goal is to connect to a MS Access db to pull values from a table to populate a drop down list.

Does anyone have experience trying to get MS Access data off of a server and populate a drop down list?

Thanks
Jesse

pclement
05-19-2004, 02:31 PM
You can remove the user ID and password arguments if you are not using user-level security. Below is a sample connection string:


cnn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=\\Server\database\db1.mdb;" & _
"Jet OLEDB:Engine Type=5;")


In addition, there can be security issues depending upon where the database is located when working through ASP/ASP.NET. If you are receiving any errors I would post them in a reply.

WoG
05-19-2004, 02:43 PM
Thanks for helping me get connected- the advice worked.

However, I am now getting an error that says cannot create Business Object, or something like that.

Anyone know what that means?