M
manooor
Guest
I'm using asp and html to develop a website,
in one of the asp files that am using, i need to excute 2 different sql statements which will insert data into two different tables. my code seems to be fine, but when i excute it i got a syntax error in one of the sql statements. these are the two statements:
*sql 1:
Sql="INSERT INTO PATIENT_INFO (FIRST_NAME, LAST_NAME, GENDER, MIDDLE_NAME,FILE_ID, BIRTH, NATIONALITY, FIRST_SESSION, DISORDER, THERAPIST_ID, SEVERITY, ASSESSMENT,CIVIL_ID,FOLLOW_UP_NOTE,HISTORY,IQ ,NEXT_SESSION) VALUES ('" _
& strfirstname & "','" & strlastname & "','" & strgender & "','" & strmiddlename & "','" & strfileid & "','" & strbirth & "', '" & strnationality & "', '" _
& strfirstsession & "', '" & strdisorder & "', '" & strtherapistid & "' , '" & strseverity & "','" & strassessment & "','" _
& strcivilid & "','"& strfollowup & "','"& strhistory & "', '" & striq & "', '" & strnexts & "' )"
*sql2:
Sql="INSERT INTO VERIFICATION (USER_NAME, PASSWORD) VALUES ('" _
& strfileid & "','" & strcivilid & "' )"
in one of the asp files that am using, i need to excute 2 different sql statements which will insert data into two different tables. my code seems to be fine, but when i excute it i got a syntax error in one of the sql statements. these are the two statements:
*sql 1:
Sql="INSERT INTO PATIENT_INFO (FIRST_NAME, LAST_NAME, GENDER, MIDDLE_NAME,FILE_ID, BIRTH, NATIONALITY, FIRST_SESSION, DISORDER, THERAPIST_ID, SEVERITY, ASSESSMENT,CIVIL_ID,FOLLOW_UP_NOTE,HISTORY,IQ ,NEXT_SESSION) VALUES ('" _
& strfirstname & "','" & strlastname & "','" & strgender & "','" & strmiddlename & "','" & strfileid & "','" & strbirth & "', '" & strnationality & "', '" _
& strfirstsession & "', '" & strdisorder & "', '" & strtherapistid & "' , '" & strseverity & "','" & strassessment & "','" _
& strcivilid & "','"& strfollowup & "','"& strhistory & "', '" & striq & "', '" & strnexts & "' )"
*sql2:
Sql="INSERT INTO VERIFICATION (USER_NAME, PASSWORD) VALUES ('" _
& strfileid & "','" & strcivilid & "' )"