sql and session variables

Results 1 to 2 of 2

Thread: sql and session variables

  1. #1
    Join Date
    Dec 1969

    Default sql and session variables

    I can get the value of the session variable, but I am having trouble with the concatination/quotes syntax. I keep getting an error message of too few parameters. Line 4 and 5 is where the problem occurs. Remember, I am trying to have the sql = the session variable, any help will be appreciated, along with any tips on quote syntax.<BR>Thanks<BR><BR>here is my code:<BR><BR>If Session("departmentnum") &#062; "0" Then<BR> Query = "SELECT UserName, pass, UserID "<BR> Query = Query & "FROM Securities "<BR> Query = Query & "WHERE ("DepartmentID") = " & Session("departmentnum") "<BR>End If<BR>Set DataConn = Server.CreateObject("ADODB.Connection")<BR>DataCon n.Open "DSN=kevincar", "CARDoc"<BR>Set RSlist = Server.CreateObject("ADODB.recordset")<BR>RSlist.O pen Query,DataConn,3,3

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: sql and session variables

    response.write Query and check the SQL it returns to see if it is right.<BR><BR>

Posting Permissions

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