Forums: User session value in lookup field from child table - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

User session value in lookup field from child table Rate Topic: -----

#1 User is offline   Virk 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 66
  • Joined: 30-December 10

Posted 03 June 2018 - 07:25 AM

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.
0

#2 User is offline   gonzalosb 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 170
  • Joined: 11-September 13

Posted 03 June 2018 - 08:27 PM

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.
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked