This topic is locked

User session value in lookup field from child table

6/3/2018 3:25:48 AM
ASPRunnerPro General questions
A
adnankmk author

Dear Sir,

I am using asp runner 7.1. I have two three tables

users

student

Teachers_grade
I want to get data in teachers_grade from students tables. The Students tables have foreign key of users table and primary key. I used this using lookup table values and gives this code in where command.
" username = '"&& Session("UserID") && "'".
I entered this code and got the following error.
Microsoft VBScript compilation error '800a03ea'
Syntax error
/include/aspfunctions.asp, line 2587
GetLWWhere = " username = '" && Session("UserID") && "'"

------------------------------^.
Kindly help me to resolve this issue.

G
gonzalosb 6/3/2018

Hi Virk.

The issue you have is the use of apostrophes. Should be " to open first expression then ' to open second expression and ' again to close then " to finish.

Like:
"Username=Session('Userid')".
Something like that. depends on the expression. Work with it and I will send you one more accurate when I get in front of my work computer .

Hope this help you.