PROBLEMS CONVERTING TO DSN LESS CONN.

Results 1 to 5 of 5

Thread: PROBLEMS CONVERTING TO DSN LESS CONN.

  1. #1
    Marco Kooreman Guest

    Default PROBLEMS CONVERTING TO DSN LESS CONN.

    I,ve got problems to convert my existing ASP pages to DSN Less connections.<BR><BR>When I use the following code I get the following error:<BR><BR>Microsoft VBScript runtime fout &#039 800a01a8&#039 <BR><BR>Object required: &#039Conn&#039 <BR><BR>/supermarkt/mall/getorder.asp, regel 13 <BR><BR>Can anybody help?<BR><BR><BR><BR>&#060;%<BR>lobby ="lobby.asp"<BR><BR>theipaddress = Request.ServerVariables("REMOTE_ADDR")<BR>thedate = Cstr(Now)<BR>ipaddress = theipaddress & "." & thedate<BR><BR>Dim ObjConn<BR>Set objConn=Server.CreateObject("ADODB.Connection")<BR >objConn.ConnectionString="Provider=Microsoft.Jet. OLEDB.3.51; Data Source=c:intepubwwwrootsupermarktorderdbsuper.mdb" <BR><BR>sqlquery = "INSERT INTO [order] (IP) VALUES(&#039" & ipaddress & "&#039)"<BR>rem response.write sqlquery<BR>Set RS = Conn.Execute(sqlquery)<BR><BR>sqlquery2 = "SELECT orderid FROM [order] WHERE IP = &#039" & ipaddress & "&#039"<BR>rem response.write sqlquery2<BR>Set RS2 = Conn.Execute(sqlquery2)<BR><BR>theorderid = RS2(0)<BR>rem sqlquery3 = "INSERT INTO [neworder] (customer.orderid, payment.orderid) VALUES(&#039" + theorderid + "&#039,&#039" + theorderid + "&#039)"<BR>vstring = "&#039" & theorderid & ", " & theorderid & "&#039"<BR>sqlquery3 = "INSERT INTO [neworder] (customer.orderid, payment.orderid) VALUES(&#039" & theorderid & "&#039, &#039" & theorderid & "&#039)"<BR>rem response.write sqlquery3<BR>Set RS3 = Conn.Execute(sqlquery3)<BR><BR>Response.Cookies("S alescart")="order"<BR>Response.Cookies("Salescart" )("order")=theorderid<BR><BR>rem RS.Close<BR>Conn.Close<BR><BR>&#037;&#062;&#060;%< BR>gostring = lobby & "?order=" & theorderid <BR>Response.Redirect (gostring) &#037;&#062;&#060;html><BR>

  2. #2
    Jack van Dijk Guest

    Default RE: PROBLEMS CONVERTING TO DSN LESS CONN.

    Hi Marco,<BR><BR>If you&#039ve directly copied and pasted the source, you&#039ve made<BR>a typo. Namely:<BR><BR>Source=c:intepub...<BR><BR>Should be: Source=c:inetpub<BR><BR>Groeten,<BR><BR>Jack<BR>

  3. #3
    Marco Kooreman Guest

    Default RE: PROBLEMS CONVERTING TO DSN LESS CONN.

    Jack,<BR><BR>This isn&#039t the problem I changed it and still get the same error.<BR><BR>Any other suggestions.<BR><BR>Thanks,<BR><BR>Marco

  4. #4
    KPW Guest

    Default RE: PROBLEMS CONVERTING TO DSN LESS CONN.

    In several places you reference Conn (Conn.Execute, Conn.Close), but you dimensioned a variable named objConn.<BR><BR>I would change your "Conn" references to "objConn".<BR><BR>Hope this helps!


  5. #5
    Marco Kooreman Guest

    Default RE: PROBLEMS CONVERTING TO DSN LESS CONN.

    Thanks,<BR><BR>This helped a bit.<BR><BR>If I use:<BR><BR>objConn.ConnectionString="Provider=Mic rosoft.Jet.OLEDB.3.51; Data Source="DSN=super"<BR><BR>everything works perfect.<BR><BR>But if I want to get a DSN Less Connection and use:<BR><BR>objConn.ConnectionString="Provider=Mic rosoft.Jet.OLEDB.3.51; Data Source=c:inetpubwwwrootsupermarktorderdbsuper.mdb" <BR><BR>I get a Jet.OLEDB error that he can&#039t find it.<BR><BR>Any other suggestions.<BR><BR>Thanks,<BR><BR>Marco

Posting Permissions

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