Retrieving individual data

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Retrieving individual data

    Hi am trying to retrieve indivual data from a database and i keep getting the
    following error.
    Microsoft VBScript compilation (0x800A0401)
    Expected end of statement

    The following code is for verifying the user logged in
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
    Source=D:\web\projects\99098932\project\project.md b;"

    username=trim(request.form("Username"))
    password=trim(request.form("password"))
    If username = "" or password = "" then
    reponse.redirect
    End If
    Set RS= Server.CreateObject("ADODB.Recordset")
    RS.Open
    foundIt=False
    Do Until RS.EOF OR foundIt
    If(StrComp(RS("Username"), username, vbTextCompare) =0) Then
    foundIt=True
    Else
    RS.MoveNext
    End If
    Loop
    If Not foundIt Then
    RS.Close
    Set RS = Nothing
    objConn.Close
    Set objConn = Nothing
    response.redirect
    End If
    If Not(StrComp(RS("password"), password, vbBinaryCompare) = 0) Then
    RS.Close
    Set RS = Nothing
    objConn.Close
    Set objConn = Nothing
    Response.Redirect
    Else Session("Valid") = Request("Username")
    Response.Redirect
    End If

    The code for retrieving individual data is as follows
    Set conn1= Server.CreateObject("ADODB.Connection")
    conn1.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
    Source=D:\web\projects\99098932\project\project.md b;"
    '--get statement recordset--
    set rs1 = Server.CreateObject ("ADODB.Recordset")
    rs1.open "select * from statement WHERE Username='<%=session("Valid")%>'",
    conn1
    Please somebody help

    pat luton Guest

  2. Similar Questions and Discussions

    1. retrieving individual record
      Hi am trying to retrieve individual record does anyone have a clue how to go about it.The code below retrieves all records in the statement table...
    2. Retrieving data from (irregular) XML
      I am retrieving XML files like the one at the end of this post. I can use xmlParse to create the object and retrieve elements. However I need to...
    3. Retrieving Updated Data
      Hi, I have a Windows application that consumes a web service. The data returned from this service contains product prices, ratings and other...
    4. retrieving data from website
      hi there all, me again... is it possible if you know the layout of a web site, to retrieve data from it? i mean things like a weather site that...
    5. PHP problem retrieving data
      I'm not sure why this isn't working, but it's giving me no output. I have a form which requests email and city to pull up a listing, then Email that...
  3. #2

    Default Re: Retrieving individual data

    for the error, check [url]http://aspfaq.com/show.asp?id=2363[/url]

    anyway, i'm not clear why do you need the first code segment

    pat luton wrote:
    > Hi am trying to retrieve indivual data from a database and i keep getting the
    > following error.
    > Microsoft VBScript compilation (0x800A0401)
    > Expected end of statement
    >
    > The following code is for verifying the user logged in
    > Set objConn = Server.CreateObject("ADODB.Connection")
    > objConn.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
    > Source=D:\web\projects\99098932\project\project.md b;"
    >
    > username=trim(request.form("Username"))
    > password=trim(request.form("password"))
    > If username = "" or password = "" then
    > reponse.redirect
    > End If
    > Set RS= Server.CreateObject("ADODB.Recordset")
    > RS.Open
    > foundIt=False
    > Do Until RS.EOF OR foundIt
    > If(StrComp(RS("Username"), username, vbTextCompare) =0) Then
    > foundIt=True
    > Else
    > RS.MoveNext
    > End If
    > Loop
    > If Not foundIt Then
    > RS.Close
    > Set RS = Nothing
    > objConn.Close
    > Set objConn = Nothing
    > response.redirect
    > End If
    > If Not(StrComp(RS("password"), password, vbBinaryCompare) = 0) Then
    > RS.Close
    > Set RS = Nothing
    > objConn.Close
    > Set objConn = Nothing
    > Response.Redirect
    > Else Session("Valid") = Request("Username")
    > Response.Redirect
    > End If
    >
    > The code for retrieving individual data is as follows
    > Set conn1= Server.CreateObject("ADODB.Connection")
    > conn1.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
    > Source=D:\web\projects\99098932\project\project.md b;"
    > '--get statement recordset--
    > set rs1 = Server.CreateObject ("ADODB.Recordset")
    > rs1.open "select * from statement WHERE Username='<%=session("Valid")%>'",
    > conn1
    > Please somebody help
    >
    Manuel Socarras Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139