Results 1 to 12 of 12

Thread: [RESOLVED] <Resolved> what's wrong with this???

Threaded View

  1. #1

    Thread Starter
    Addicted Member Lemon Lime's Avatar
    Join Date
    Jul 2000
    Location
    Space, the final frontier, go along the yellow brick road,turn left then left again. In the service window, ask for the insane dude.
    Posts
    167

    Resolved [RESOLVED] <Resolved> what's wrong with this???

    Hey u all...
    I have recently started using JS on ASP, but somewhere something went wrong: I could'nt compare two strings!!
    Code:
    <%@ LANGUAGE = JScript %>
    <html>
    <%var tester = (Request.QueryString("t")), oConn, oRs, filePath, r,i=1,b=false;
    filePath = Server.MapPath("pics.mdb");
    oConn = Server.CreateObject("ADODB.Connection");
    r = Server.CreateObject("adodb.recordset");
    oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath);
    oRs = oConn.Execute("SELECT * From TableList");
    while (!oRs.eof) {
    b=b||(tester==oRs("name"));
    Response.Write(oRs("name") + ": " + b + "<BR> " );
    if (b) break;
    oRs.MoveNext();}
    oRs.close();
    if (b){
    Response.Write("<B>" +tester +" is valid!!</b>");
    }else{
    Response.Write(tester+ " is invalid!!");}%>
    My server's response is always invalid, even if ?t='s value is in the table.
    What should I do??
    Last edited by Lemon Lime; Sep 5th, 2005 at 11:49 AM. Reason: resolved
    I've had enough with sainity!
    What's the use of it anyway?

Posting Permissions

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



Click Here to Expand Forum to Full Width