Results 1 to 3 of 3

Thread: This is probably simple (SQL)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    I'm not familiar with how to do this in ASP. Can any one help. ASP tells me there should be a closing parenthesis at "ID" (ISSUENUM1 is a column in the table):
    <%
    Dim Connect, Query, var
    Set Connect = Server.CreateObject("ADODB.Connection")
    Connect.Open "NewSite"
    Set Query = Connect.Execute ("Select * from Tracking where "ID" = Query("ISSUENUM1"))
    do until Query.EOF
    stuff
    loop
    %>

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    I think your problems comes from trying to use quoatation marks inside a string literal. Replace them with the ' character.
    "People who think they know everything are a great annoyance to those of us who do."

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    Hey thanks for the help!
    Thanks to you guys and Dave in work, this code works:

    ' ISSUENUM1 is the value I'm passing from other form
    ' NewSite is the DSN
    ' Tracking is the Database Table
    ' ID is the field
    <%
    Dim Connect,Crit, Query, var
    Crit = Request.Form("ISSUENUM1")
    Set Connect = Server.CreateObject("ADODB.Connection")
    Connect.Open "NewSite"
    SQLstr = "Select * from Tracking where ID= '" & Crit & "'"
    Set Query = Connect.Execute (SQLstr)
    do until Query.EOF
    'stuff
    loop
    %>

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