Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

PLZ HELP - incorrect syntax near (stored string)

$
0
0
I am writing a code on VB and when the code executes my sql statement brings up an error

SQL statement:
"Select ISNULL(FirstName, '') + SPACE(1) + ISNULL(LastName, '') AS FullName, ClassID FROM StudentClassDetails, StudentsInfo where StudentsInfo.StudentID = StudentClassDetails.StudentID And StudentClassDetails.ClassID in '" & SelectedTitles.ToString & "'"

Error Message:
Incorrect syntax near '1,6,8,11,14,16,20,21,33,34'.


'1,6,8,11,14,16,20,21,33,34' is a string stored in SelectedTitles


Thanks in advance

Viewing all articles
Browse latest Browse all 13329

Trending Articles