R
Red_Star20
I have a form that submits data into an oracle database and i am getting an
error, but not all the time....
Error msg:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Oracle][ODBC][Ora]ORA-00917: missing comma
here is my code:
strSQL = "INSERT INTO student_data
(bannerid,lastname,firstname,sex,birthday,citizen,major,credithours,gpa,dorm,second_language,localaddress,localapt,localcity,localstate,localzipcode,localphonenumber,cellphonenumber,email,permanentaddress,permanentcity,permanentstate,permanentzip,permanentphonenumber,overseasexperience,reasonstotravel,choice1,choice2,choice3,choice4,choice5,choice6,choice7,Ec_Name,Ec_Relationship,Ec_Address,Ec_City,Ec_State,Ec_Zip,Ec_HomePhone,Ec_HomeCellPhone,Tuition_Type,Submit_Date,choice1_status,choice2_status,choice3_status,choice4_status,choice5_status,choice6_status,choice7_status,comfort_zone,food,behavior,class_choice,class_choice1,InfoSession,EC_Country,PermanentCountry)
VALUES ('" & bannerid & "','" & lastname & "','" & firstname & "','" & sex &
"',TO_DATE('" & birthday & "','MM/DD/YYYY'),'" & citizen & "','" & major &
"'," & credithours & ",'" & gpa & "','" & campusmail & "','" &
second_language & "','" & localaddress & "','" & localapt & "','" & localcity
& "','" & localstate & "'," & localzipcode & ",'" & localphonenumber & "','"
& cellphonenumber & "','" & email & "','" & permanentaddress & "','" &
permanentcity & "','" & permanentstate & "'," & permanentzipcode & ",'" &
permanentphonenumber & "','" & overseasexp & "','" & reasonstotravel & "','"
& choice1 & "','" & choice2 &"','" & choice3 &"','" & choice4 &"','" &
choice5 &"','" & choice6 &"','" & choice7 &"','" & Ec_Name & "','" &
Ec_Relationship & "','" & Ec_Address & "','" & Ec_City & "','" & Ec_State &
"'," & Ec_Zip & ",'" & Ec_HomePhone & "','" & Ec_HomeCellPhone & "','" &
Tuition_Type & "',TO_DATE('" & Date_Submitted & "','MM/DD/YYYY'),'" &
choice1_status & "','" & choice2_status & "','" & choice3_status & "','" &
choice4_status & "','" & choice5_status & "','" & choice6_status & "','" &
choice7_status & "','" & comfort_zone & "','" & food & "','" & behavior &
"','" & class_choice & "','" & class_choice1 & "','" & InfoSession & "','" &
EC_Country & "','" & Permanent_Country & "')"
dbConnection.execute(strSQL)
Any ideas as to what can be causing this error?
I
error, but not all the time....
Error msg:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Oracle][ODBC][Ora]ORA-00917: missing comma
here is my code:
strSQL = "INSERT INTO student_data
(bannerid,lastname,firstname,sex,birthday,citizen,major,credithours,gpa,dorm,second_language,localaddress,localapt,localcity,localstate,localzipcode,localphonenumber,cellphonenumber,email,permanentaddress,permanentcity,permanentstate,permanentzip,permanentphonenumber,overseasexperience,reasonstotravel,choice1,choice2,choice3,choice4,choice5,choice6,choice7,Ec_Name,Ec_Relationship,Ec_Address,Ec_City,Ec_State,Ec_Zip,Ec_HomePhone,Ec_HomeCellPhone,Tuition_Type,Submit_Date,choice1_status,choice2_status,choice3_status,choice4_status,choice5_status,choice6_status,choice7_status,comfort_zone,food,behavior,class_choice,class_choice1,InfoSession,EC_Country,PermanentCountry)
VALUES ('" & bannerid & "','" & lastname & "','" & firstname & "','" & sex &
"',TO_DATE('" & birthday & "','MM/DD/YYYY'),'" & citizen & "','" & major &
"'," & credithours & ",'" & gpa & "','" & campusmail & "','" &
second_language & "','" & localaddress & "','" & localapt & "','" & localcity
& "','" & localstate & "'," & localzipcode & ",'" & localphonenumber & "','"
& cellphonenumber & "','" & email & "','" & permanentaddress & "','" &
permanentcity & "','" & permanentstate & "'," & permanentzipcode & ",'" &
permanentphonenumber & "','" & overseasexp & "','" & reasonstotravel & "','"
& choice1 & "','" & choice2 &"','" & choice3 &"','" & choice4 &"','" &
choice5 &"','" & choice6 &"','" & choice7 &"','" & Ec_Name & "','" &
Ec_Relationship & "','" & Ec_Address & "','" & Ec_City & "','" & Ec_State &
"'," & Ec_Zip & ",'" & Ec_HomePhone & "','" & Ec_HomeCellPhone & "','" &
Tuition_Type & "',TO_DATE('" & Date_Submitted & "','MM/DD/YYYY'),'" &
choice1_status & "','" & choice2_status & "','" & choice3_status & "','" &
choice4_status & "','" & choice5_status & "','" & choice6_status & "','" &
choice7_status & "','" & comfort_zone & "','" & food & "','" & behavior &
"','" & class_choice & "','" & class_choice1 & "','" & InfoSession & "','" &
EC_Country & "','" & Permanent_Country & "')"
dbConnection.execute(strSQL)
Any ideas as to what can be causing this error?
I