Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with connection while developing application

Status
Not open for further replies.

AnilNe

IS-IT--Management
Dec 31, 2003
31
US
Dear Friends,
I need to setup one web application.
The application works well when it is run in IIS which connection string as

<%
var MM_Journal_Thesis_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=D:\Websites\Journal_thesis\hellis.mdb"
%>

Now I need to upload this application on a website.
For that I have changed its physical path into Server.MapPath. The code is

<%
var MM_Journal_Thesis_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("../hellis.mdb")
%>

In this case, it gives error as
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

I have tried so many ways. But still getting the same problem. I have made this web application with Dreamweaver MX 2004.

Any help from your side will be highly appreciated.

With Regards,
Anil


 
Try a top down reference to the DB. In other words use:

Code:
<%
var MM_Journal_Thesis_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=/Journal_thesis/hellis.mdb"
%>


If it is a Windows server that method should work without the Server.MapPath or the ../. (It is probably the ../ that is causing the problem)

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
i also suggest a resposne.write
<%
response.write "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("../hellis.mdb")

var MM_Journal_Thesis_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.MapPath("../hellis.mdb")
%>


does it give the correct path???

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top