SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict certify's Avatar
    Join Date
    May 2001
    Location
    Malaysia
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't click anything on the checkbox and click Add to Cart! this message will prompt out (netscape only).

    Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

    [Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database engine cannot find the input table or query 'tbl_cart_105200120911'. Make sure it exists and that its name is spelled correctly.

    /confirm.asp, line 95
    This is the file revert.asp

    <%
    set cn = Server.CreateObject("ADODB.Connection")
    set rs = Server.CreateObject("ADODB.RecordSet")
    set rs1 = Server.CreateObject("ADODB.RecordSet")
    cn.Open "certify"

    cday=day(date)
    cmonth=month(date)
    cyear=year(date)
    chour=hour(time)
    cmin=minute(time)
    csec=second(time)

    DateTime=cday & cmonth & cyear & chour & cmin & csec

    sql="select * into tbl_cart_" & DateTime & " from tbl_cart"
    rs.open sql,cn
    sql="insert into tbl_track values('tbl_cart_" & DateTime & "','" & date & "')"
    cn.execute sql

    For Each item in request.form()

    if item="datetime" then
    sql="delete from tbl_track where tbl_cart_no='tbl_cart_" & request.form("datetime") & "'"
    cn.execute sql

    sql="drop table tbl_cart_" & request.form("datetime")
    cn.execute sql
    end if

    if request.form(item)="on" then
    sql = "select * from tbl_module where module_id='" & item & "'"
    rs1.open sql,cn

    sql="insert into tbl_cart_" & DateTime & " values ('" & item & "'," &_
    "'" & rs1("module") & "', '" & rs1("descp") & "', '" & rs1("test_no") & "'," &_
    "" & rs1("no_ques") & ", " & rs1("price") & ")"
    cn.execute sql
    rs1.close
    end if

    next

    cn.close
    set rs = nothing
    set cn = nothing
    %>
    <head>
    <script language="javascript">

    function SetCookie(name, value)
    {var argv = SetCookie.arguments;
    var argc = SetCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");}

    function KillCookie()
    {var expdate = new Date ();
    expdate.setTime (expdate.getTime() + (1000));
    (expdate);}

    function set_name()
    {KillCookie();
    SetCookie("certify","buy2");}

    function getCookieVal(offset)
    {var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
    endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));}

    function GetCookie(name)
    {var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;

    while (i < clen)
    {var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;}
    return null;}

    function CheckCookie()
    {
    if (GetCookie("certify")!='buy1')
    {location.replace("index.asp");}
    else
    {set_name();
    location.replace("https://www.certifypro.com/confirm.asp?datetime=<%response.write DateTime%>");}
    }

    </script>
    </head>
    <body onLoad="CheckCookie()" ></body>
    Unfortunately our so call consultants have no fix on this problem. Any suggestions?
    Your WebHosting Partner - RouterWebHost.com
    eXam SIMulation Software - ExamSim.net
    geeks forums -ProgrammingTutor.com
    BMWClub of Malaysia - BMWClub.com.my
    unofficial MU Fan Club coming soon - ManchesterUnited.com.my


  2. #2
    SitePoint Addict Drinky's Avatar
    Join Date
    Jan 2001
    Location
    England
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this the whole file? because line 95 is javascript in this snippett.

    Code:
    <% 
    set cn = Server.CreateObject("ADODB.Connection") 
    set rs = Server.CreateObject("ADODB.RecordSet") 
    set rs1 = Server.CreateObject("ADODB.RecordSet") 
    cn.Open "certify" 
    
    cday=day(date) 
    cmonth=month(date) 
    cyear=year(date) 
    chour=hour(time) 
    cmin=minute(time) 
    csec=second(time) 
    
    DateTime=cday & cmonth & cyear & chour & cmin & csec 
    
    sql="SELECT * INTO tbl_cart_" & DateTime & " FROM tbl_cart"[/color]
    	rs.open sql,cn 
    sql="INSERT INTO tbl_track VALUES('tbl_cart_" & DateTime & "','" & date & "')" 
    	cn.execute sql 
    
    For Each item in request.form() 
    
    if item="datetime" then 
    	sql="DELETE FROM tbl_track WHERE tbl_cart_no='tbl_cart_" & request.form("datetime") & "'" 
    	cn.execute sql 
    
    	sql="DROP TABLE tbl_cart_" & request.form("datetime") 
    	cn.execute sql 
    end if 
    
    if request.form(item)="on" then 
    	sql = "SELECT * FROM tbl_module WHERE module_id='" & item & "'" 
    	rs1.open sql,cn 
    
    	sql="INSERT INTO tbl_cart_" & DateTime & " VALUES('" & item & "'," &_ 
    		"'" & rs1("module") & "', '" & rs1("descp") & "', '" & rs1("test_no") & "'," &_ 
    		"" & rs1("no_ques") & ", " & rs1("price") & ")" 
    	cn.execute sql 
    	rs1.close 
    end if 
    
    next 
    
    cn.close 
    set rs = nothing 
    set cn = nothing 
    %> 
    <head> 
    <script language="javascript"> 
    
    function SetCookie(name, value) {
    	var argv = SetCookie.arguments; 
    	var argc = SetCookie.arguments.length; 
    	var expires = (argc > 2) ? argv[2] : null; 
    	var path = (argc > 3) ? argv[3] : null; 
    	var domain = (argc > 4) ? argv[4] : null; 
    	var secure = (argc > 5) ? argv[5] : false; 
    	document.cookie = name + "=" + escape (value) + 
    		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
    		((path == null) ? "" : ("; path=" + path)) + 
    		((domain == null) ? "" : ("; domain=" + domain)) + 
    		((secure == true) ? "; secure" : "");
    } 
    
    function KillCookie(){
    	var expdate = new Date (); 
    	expdate.setTime (expdate.getTime() + (1000)); 
    	(expdate);
    } 
    
    function set_name(){
    	KillCookie(); 
    	SetCookie("certify","buy2");
    } 
    
    function getCookieVal(offset){
    	var endstr = document.cookie.indexOf (";", offset); 
    	if (endstr == -1) 
    		endstr = document.cookie.length; 
    	return unescape(document.cookie.substring(offset, endstr));
    } 
    
    function GetCookie(name) {
    	var arg = name + "="; 
    	var alen = arg.length; 
    	var clen = document.cookie.length; 
    	var i = 0; 
    
    	while (i < clen) {
    		var j = i + alen; 
    		if (document.cookie.substring(i, j) == arg) 
    			return getCookieVal (j); 
    		i = document.cookie.indexOf(" ", i) + 1; 
    		if (i == 0) break;
    	} 
    	return null;
    } 
    
    function CheckCookie(){ 
    	if (GetCookie("certify")!='buy1') {
    		location.replace("index.asp");
    	} else {
    		set_name(); 
    		location.replace("https://www.certifypro.com/confirm.asp?datetime=<%response.write DateTime%>");
    	} 
    } 
    
    </script> 
    </head> 
    <body onLoad="CheckCookie()" ></body>
    Highlighted in blue is a piece of javascript that appends the value of DateTime to the query string.
    Highlighted in darkgreen is the piece of code that i assume tries to pick this up from Request.form(),
    which won't work since Request.form() only contains data from form elements. See the red highlight.

    The datetime var from the query string is located in Request("datetime") not Request.form("datetime")

    This is not the error but one of them, since the lines in green should never be executed.

    I think there is a problem in the following if statement but i'm not seeing it, i'd need more code or to play with it, or both to pinpoint the error
    Last edited by Drinky; May 10, 2001 at 09:11.
    Drinky

  3. #3
    SitePoint Addict Drinky's Avatar
    Join Date
    Jan 2001
    Location
    England
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can't seem to make the same error happen

    https://www.certifypro.com/confirm.a...e=115200102215

    looking at the source the javascript is output before the <html> tag at the top of the document.
    IE doesn't care but i bet netscape does.

    There are no <form></form> tags around the two buttons at the bottom of the page so they don't appear in netscape so i can't go on.

    I don't understand the need for all the javascript cookie stuff why they don't use the Session object i don't know...
    Drinky

  4. #4
    SitePoint Addict certify's Avatar
    Join Date
    May 2001
    Location
    Malaysia
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Line 95 is in Red

    <%
    if request("datetime")<>"" then
    tot=0
    sql="select * from tbl_cart_" & request("datetime")
    rs.open sql,cn
    if rs.eof=true then
    rs.close
    sql="delete * from tbl_track where tbl_cart_no='tbl_cart_" & request("datetime") & "'"
    cn.execute sql
    sql="drop table tbl_cart_" & request("datetime")
    cn.execute sql
    %>
    Your WebHosting Partner - RouterWebHost.com
    eXam SIMulation Software - ExamSim.net
    geeks forums -ProgrammingTutor.com
    BMWClub of Malaysia - BMWClub.com.my
    unofficial MU Fan Club coming soon - ManchesterUnited.com.my


  5. #5
    SitePoint Addict certify's Avatar
    Join Date
    May 2001
    Location
    Malaysia
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just in case this is the entire confirm.asp file

    <%
    dim tot
    set cn = Server.CreateObject("ADODB.Connection")
    set rs = Server.CreateObject("ADODB.RecordSet")
    cn.open "certify"
    %>

    <script language="javascript">

    function SetCookie (name, value)
    {var argv = SetCookie.arguments;
    var argc = SetCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");}

    function set_name()
    {KillCookie();
    SetCookie ("certify","buy3");
    location.replace('payment.asp?datetime=<%response.write request("datetime")%>');}

    function set_name2()
    {KillCookie();
    SetCookie ("certify","index");
    location.replace('index3.asp?datetime=<%response.write request("datetime")%>');}

    function getCookieVal(offset)
    {var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1)
    endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));}

    function GetCookie(name)
    {var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;

    while (i < clen)
    {var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;}
    return null;}

    function CheckCookie()
    {
    if (GetCookie("certify")!='buy2')
    {location.replace('index.asp');}}

    function KillCookie()
    {var expdate = new Date ();
    expdate.setTime (expdate.getTime() + (1000));
    (expdate);}

    </script>

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">

    <title>CertifyPro Best Tool For MCSE, CCNA, CCDA, CCNP, CCDP, CNE, Aplus, Network+</title>
    <meta name="description" content="Your the Ultimate test prep tool you ever needed for your MCSE, CCNA, CCDA, CCNP, CCDP, CNE, Aplus, Network+">
    <meta name="keywords" content="MCSE, Braindump heaven, A+, A plus, networking,braindumps, network essentials, cramsession, FREE sample tests, novell, cne, netware, linux, msce, rampage, Microsoft Certified Systems Engineer, MCP,Salsakid ,Viol8tr, Pepe, testmaster, Windows NT, Internet Information Server, TCP/IP, Braindump heaven, Microsoft Certified Professional, Windows 95, Workstation, Server, 4.0, SQL, MS Exchange,Free Braindumps, Web, checkpoint, beach front quizzer,MCSD, transcender, SQL 7.0, CISCO, CCIE, CCNA, CCNP, router, switch, I-Net, CIW">
    <meta name="revisit-after" Content="7 days">
    <meta name="Robots" content="all">

    <style TYPE="text/css">
    <!--
    A:link { text-decoration: none }
    A:active { text-decroation: none }
    A:visited { text-decoration: none }
    A:hover {text-decoration: underline}
    -->
    </style>
    </head>

    <body onLoad="CheckCookie()" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" text="#000000" link="#0000FF" vlink="#0000FF" alink="#FF3300">

    <%
    if request("datetime")<>"" then
    tot=0
    sql="select * from tbl_cart_" & request("datetime")
    rs.open sql,cn
    if rs.eof=true then
    rs.close
    sql="delete * from tbl_track where tbl_cart_no='tbl_cart_" & request("datetime") & "'"
    cn.execute sql
    sql="drop table tbl_cart_" & request("datetime")
    cn.execute sql
    %>

    <script language="javascript">
    function back()
    {alert("You have not selected any module to buy, please select at least one module and try again");
    location.replace('index.asp');}
    back();
    </script>

    <%
    else
    %>

    <!--table for CerfifyPro-->

    <table border="0" cellPadding="0" cellSpacing="0" width="600" bgcolor="#FFEFDF"><td>
    <table border="0" cellPadding="0" cellSpacing="0" width="100%">
    <tr>
    <td vAlign="top" width="100%">
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="10%" bgcolor="#FF9900" valign="top" align="left"><img border="0" src="https://www.certifypro.com/images/orange4.jpg" width="17" height="22"></td>
    <td width="90%" bgcolor="#FF9900"><img border="0" src="https://www.certifypro.com/images/certifypro.jpg"></td>
    <td width="10%" align="right" bgcolor="#FF9900" valign="top">

    <img border="0" src="https://www.certifypro.com/images/orange5.jpg">
    </table>
    </td>
    </tr>
    </table>

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="100%" height="2" bgcolor="#FFCA79" colspan="2"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="6" bgcolor="#FF9933" colspan="2"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="1" bgcolor="#B06A00" colspan="2"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" bgcolor="#006600" align="center" valign="middle" colspan="2"><font color="#FFFFFF" size="2" face="Verdana"><b>
    Secure Area!</b>
    </font></td>
    </tr>
    <tr>
    <td width="100%" height="2" bgcolor="#FFCA79" colspan="2"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="6" bgcolor="#FF9933" colspan="2"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="1" bgcolor="#B06A00" colspan="2"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="30%" height="0" bgcolor="#006600"><img border="0" src="https://www.certifypro.com/images/upe.jpg"></td>
    <td width="70%" height="0"><img border="0" src="https://www.certifypro.com/images/green.jpg"></td>
    </tr>
    </table>

    <!--table for center part-->
    <table border="0" width="600" height="193">
    <tr>
    <td width="100%" height="189" valign="top">
    <font face="Verdana" size="2"><br>
    </font>

    <!--table for center part-->
    <table cellSpacing="0" cellPadding="0" width="100%" border="0">
    <tbody>
    <tr>
    <td>

    <!--table for title,details and remove-->
    <form method="post" action="remove.asp">
    <table borderColor="#000000" cellSpacing="0" cellPadding="0" width="600" bgColor="#FFFF00" border="0">
    <tbody>
    <tr bgColor="#cccccc">
    <td width="78" align="center"><b><font face="Verdana" size="2">Remove
    Item</font></b></td>
    <td width="78">
    <div align="center">
    <b><font face="Verdana" size="2">Modules</font></b>
    </div>
    </td>
    <td width="329">
    <div align="center">
    <b><font face="Verdana" size="2">Description</font></b>
    </div>
    </td>
    <td width="45">
    <div align="center">
    <b><font face="Verdana" size="2">Test#</font></b>
    </div>
    </td>
    <td width="44">
    <div align="center">
    <b><font face="Verdana" size="2"># of ?</font></b>
    </div>
    </td>
    <td width="92">
    <div align="center">
    <b><font face="Verdana" size="2">Price</font></b>
    </div>
    </td>
    </tr>

    <%
    do while not rs.eof
    tot=tot+rs("price")
    %>
    <tr vAlign="top" bgColor="#ffffcc">
    <td width="78" align="center"><font face="Verdana" size="2"><input name="<%response.write rs("module_id")%>" type="checkbox"></font></td>
    <td width="78" align="center"><font face="Verdana" size="2"><%response.write rs("module")%></font></td>
    <td width="329"><font face="Verdana" size="2"><%response.write rs("descp")%></font></td>
    <td width="65">
    <div align="left">
    <font face="Verdana" size="2"><%response.write rs("test_no")%></font>
    </div>
    </td>
    <td width="44">
    <div align="left">
    <font face="Verdana" size="2"><%response.write rs("no_ques")%></font>
    </div>
    </td>
    <td width="92">
    <div align="center">
    <font face="Verdana" size="2"><%response.write FormatCurrency(rs("price"))%></font>
    </div>
    </td>
    </tr>

    <%
    rs.movenext
    loop
    rs.close
    end if
    %>

    <input type="hidden" name="datetime" value="<%response.write request("datetime")%>">

    <tr bgColor="#ffffcc">
    <td><input type="submit" value="Remove"></td>
    <td bgColor="#000000" colSpan="4">
    <div align="right"></div>
    <div align="right">
    <b><font color="#ffff00" face="Verdana" size="2">Total&nbsp;&nbsp;</font></b>
    </div>
    </td>
    <td width="92" bgColor="#ffff66">
    <div align="center">
    <b><font face="Verdana" size="2"><% response.write FormatCurrency(tot) %></font></b>
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    </form>

    </td>
    </tr>
    </tbody>
    </table>
    <p></p>

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="50%"></td>
    <td width="50%" align="right"><input type="button" onClick="set_name2()" value="Continue Shopping">&nbsp;
    <input type="button" onClick="set_name()" value="Check Out">&nbsp;</td>
    </tr>
    <tr>
    <td width="50%">&nbsp;<a href="http://www.planetpayment.com/assured_terms.cfm" target="_blank">
    <img src="/images/assured_ad.gif" border="0" alt="Planet Payment Assured Terms and Conditions"></td>
    <td width="50%" align="right"></td>
    </tr>
    </table>

    </td>
    </tr>
    </table>

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="100%" height="2" bgcolor="#FFCA79"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="6" bgcolor="#FF9933"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="1" bgcolor="#B06A00"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" bgcolor="#006600" align="center" valign="middle"><font color="#FFFFFF" size="2" face="Verdana"><b>
    Secure Area!</b>
    </font></td>
    </tr>
    <tr>
    <td width="100%" height="2" bgcolor="#FFCA79"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="6" bgcolor="#FF9933"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    <tr>
    <td width="100%" height="1" bgcolor="#B06A00"><img src="https://www.certifypro.com/images/pixel.gif" alt="" width="2" height="2"></td>
    </tr>
    </table>

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="10%" align="left" bgcolor="#FF9900" valign="bottom"><img border="0" src="https://www.certifypro.com/images/orange3.jpg"></td>
    <td width="80%" align="center" bgcolor="#FF9900"><font face="Verdana" size="1">Copyright 2001 CertifyPro. All rights reserved.</font></td>
    <td width="10%" align="right" valign="bottom" bgcolor="#FF9900"><img border="0" src="https://www.certifypro.com/images/orange2.jpg"></td>
    </tr>
    </table></td></table>

    <%end if%>

    </body>
    </html>
    Your WebHosting Partner - RouterWebHost.com
    eXam SIMulation Software - ExamSim.net
    geeks forums -ProgrammingTutor.com
    BMWClub of Malaysia - BMWClub.com.my
    unofficial MU Fan Club coming soon - ManchesterUnited.com.my


  6. #6
    SitePoint Addict certify's Avatar
    Join Date
    May 2001
    Location
    Malaysia
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody can help me?
    Your WebHosting Partner - RouterWebHost.com
    eXam SIMulation Software - ExamSim.net
    geeks forums -ProgrammingTutor.com
    BMWClub of Malaysia - BMWClub.com.my
    unofficial MU Fan Club coming soon - ManchesterUnited.com.my



Bookmarks

Posting Permissions

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