English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have an web application that I made and put up on a webserver. It pulls data from an access database that I use as a demo database. I am trying to get my connection string set up right to work with my database since it is now on the host server and not my computer. I have my access databse loaded up on my host webserver and and the host company has a page that test the connection to the databse and it tells me the connection string and then displays all the tables in the access database. So it is working proberly. The connection string they game me is below
set testconn=server.createobject("adodb.connection")
Set TestRs = Server.CreateObject ("ADODB.RecordSet")
cnstr = "DSN=DGFMed.demo"
testconn.Open cnstr

I dont know what my connection string should look like. What I have now is below and is not working

providerName="System.Data.OleDb" />

what do I need to change?

2007-03-01 07:52:28 · 2 answers · asked by csdraska 1 in Computers & Internet Programming & Design

2 answers

You should not be using a DSN on your host unless they have set one up for you (not recommended - DSNs are more frustrating than useful).

The following connection string should work for most situations:

"Provider = Microsoft.Jet.OLEDB.4.0; Data Source=database.mdb; User Id=usr; Password=pwd"

The example below is not correct for connecting to a file-based Access data source.

2007-03-01 08:04:40 · answer #1 · answered by Rex M 6 · 0 0

It should be


answer #2 · answered by sinkablehail1978 5 · 0 1

fedest.com, questions and answers