Regd. the error message that I get

Results 1 to 2 of 2

Thread: Regd. the error message that I get

  1. #1
    Krishna Guest

    Default Regd. the error message that I get

    Hai, <BR>I have a small ASP application. My Web admin told me not to use the DSN to connect to the database and that I have to include some code into the global.asa file inorder to conect to the access database. The code that I included was <BR>.... <BR>Sub Application_OnStart <BR>Appplication("MDB_ConnectionString")="Provider =Microsoft.Jet.OLEDB.4.0;Server.MapPath("fpdb/K12.mdb")&";" <BR>Application("MDB_ConnectionTimeout") = 15 <BR>Application("MDB_CommandTimeout") = 30 <BR>Application("MDB_CursorLocation") = 3 <BR>Application("MDB_RuntimeUserName") = "" <BR>Application("MDB_RuntimePassword") = "" <BR>End Sub <BR>Sub Session_OnStart <BR>Session("MDB_ConnectionString") = Application("MDB_ConnectionString") <BR>Session("MDB_ConnectionTimeout") = Application("MDB_ConnectionTimeout") <BR>Session("MDB_CommandTimeout") = Application("MDB_CommandTimeout") <BR>Session("MDB_CursorLocation") = Application("MDB_CursorLocation") <BR>Session("MDB_RuntimeUserName") = Application("MDB_RuntimeUserName") <BR>Session("MDB_RuntimePassword") = Application("MDB_RuntimePassword") <BR><BR>End Sub <BR>.... <BR>and in the asp file the code that I had included was <BR>..... <BR>set conn=server.createobject("adodb.connection") <BR>conn.Mode = adModeReadWrite <BR>conn.Open Session("MDB_ConnectionString"), Session("MDB_RuntimeUserName"), Session("MDB_RuntimePassword") <BR>DBused = "Access" <BR>.. <BR>But when I access the asp file I get an error message saying that " An error occurred on the server when processing the URL. Please contact the web author or system administrator" <BR>Can anyone shed some light on it. <BR>Thanks, <BR>Krishna

  2. #2
    Join Date
    Dec 1969

    Default RE: Regd. the error message that I get

    Your connection string was incorrect.<BR>Try this:<BR>"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("fpdb/K12.mdb")<BR><BR>And try printing out the connection string in the asp file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts