Session variable as query parameter?

Results 1 to 2 of 2

Thread: Session variable as query parameter?

  1. #1
    Garnette Guest

    Default Session variable as query parameter?

    I am trying to use the Session variable as a parameter for a query in the Visual Interdev query designer. I keep getting an error message that it doesn&#039;t "recognize the function".<BR>It is reading my session variable as a function. What is wrong with my syntax? (I don&#039;t have quotes around the SQL statement because the query designer seems to choke on them.)<BR><BR>SELECT HealthDeptID, HealthDeptName, HDAddress, HDCity,<BR> HDZip, HDEMail, HDEmergPhone, HDPhone, HDFax,<BR> HDDeliveryAddress, ChairPhone, ChairFax, ChairEMail,<BR> ChairDate, HlthOfficerPhone, HlthOfficerFax, HlthOfficerEMail,<BR> HlthOfficerDate, ChairFirstName, ChairLastName,<BR> HealthOfficerFirstName, HealthOfficerLastName<BR>FROM tblCoHealthDept<BR>WHERE tblCoHealthDept.HealthDeptID = Session(" HealthDeptID ")<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Session variable as query parameter?

    You can&#039;t DO this in the QUERY DESIGNER!<BR><BR>In the query designer, you must use a "fake" you supply manually...instead of the Session variable value.<BR><BR>When you are in the query designer, there is NO SESSION ACTIVE (a Session is *strictly* an ASP has no connection with Visual Interdev or any other development tool...and one is *ONLY* active when a user has requested an ASP page via the web server!), so how in the world could that have any meaning???<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