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

I have a asp supported site hosting. I have a asp form page that collects info and inserts into a ms-access databases. I made a system dsn for the connection. It works perfectly on my pc(localhost) but when i upload on the net it shows http 500 internal error. Why??
any solution???

visit www.indiaearns.com/t1.html for a first hand experience of the problem

Please e-mail me at robyjohn@indiaearns.com if possible !!

2006-06-25 22:13:11 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

If you are using DSN then you have to create that DSN on server, so use DSN less connection.
Use the code below

Dim cnn As Object 'Connection Object
Dim rst as Object 'RecordSet Object
Dim varConnectionString 'store connection string in a variable.
Dim sqlQuery 'Store sql query in a string variable.
varConnectionString = "Driver={Microsoft Access Driver (*.mdb)}; User ID=; pwd=; DBQ=" & Server.MapPath(<.mdb name>)
cnn = Server.CreateObject("ADODB.Connection")
cnn.open(varConnectionString)
rst = Server.CreateObject("ADODB.Recordset")
rst.Open(sqlQuery, cnn)
'Now you can populate the recordset object rst to use retrived data.

On the server keep you access .mdb file in a folder and give read and write permission to that folder, so that you can insert data in the .mdb file also.

If the problem not solve you can write me on abhi_patni@yahoo.com.

2006-06-25 22:29:06 · answer #1 · answered by Abhishek 3 · 0 0

Did you create DSN on the server?
1. Create DSN on the server via control panel of ur server
2. Change the Connection query string (if required.)

2006-06-26 05:17:54 · answer #2 · answered by Hot Chick 1 · 0 0

See this might help you

http://www.google.co.uk/search?hl=en&q=Asp-Database+Not+working+Online&btnG=Search&meta=

2006-06-26 05:30:44 · answer #3 · answered by Joe_Young 6 · 0 0

fedest.com, questions and answers