This topic is locked
[SOLVED]

 Where-clause in popup field

11/4/2010 9:23:37 PM
ASPRunnerPro General questions
P
Philip author

Hi
I try to populate a popup field on the add.asp page.
Within the Event Add page: Before process I have:
str = "select * from stamm_log where H_Lizenz_AOA= " & Session("UserID")

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection
Session("Hauptlizenz") = rsTemp("AOA_Abo_Hauptlizenz")

Response.write Session("Hauptlizenz")
On the add.asp page I put in a popup field this where-clause:
" AOA_Abo_Hauptlizenz = & Session("Hauptlizenz") "
When I try to close the "Edit as" settings I get an error.
Who canhelp with this syntax problem please?
Philip

Sergey Kornilov admin 11/5/2010

The following is incorrect

" AOA_Abo_Hauptlizenz = & Session("Hauptlizenz") "


Try one of the following

" AOA_Abo_Hauptlizenz = " & Session("Hauptlizenz")


or

" AOA_Abo_Hauptlizenz = '" & Session("Hauptlizenz") & "'"
P
Philip author 11/5/2010

Thanks Sergey
This works fine (fields are values):

" AOA_Abo_Hauptlizenz = " & Session("Hauptlizenz")
Philip