I am using oracle 9i with ASP
I am using following way to store data into oracle. This is a part of code
I am always getting missing expression or invalid column name or any other. This looks like a forest. I can't able to rectify the any problem. Is there any other way to insert data into oracle table like writing each column with form variable and then update the table.
Can you give me any better way writing a saving program.
Regards,
I am using following way to store data into oracle. This is a part of code
I am always getting missing expression or invalid column name or any other. This looks like a forest. I can't able to rectify the any problem. Is there any other way to insert data into oracle table like writing each column with form variable and then update the table.
Can you give me any better way writing a saving program.
Regards,
Code:
Set conn = Server.Createobject("ADODB.Connection")
conn.Open "DSN=ORA; User ID = scott; Password = tiger"
Set R = Server.CreateObject("ADODB.Recordset")
SQL = "INSERT INTO SABF (empno, empname, design, sex, grade, category, dob, doj, dos, ndos, doa, dojgr, reason,option1, commutation, rehabilitation, basic2003, stag2003, personalpay2003, splpay2003, adhoc2003, npa2003, da2003, protectpay2003, basic, stag, personalpay, splpay, adhoc, npa, da, protectpay, beneficiaryspouse, dobos, altnominee1, altnominee2, altnominee3, altnominee4, altnominee5, altnominee6, address, contact, assesseno, annuityno, annuityamt, onethird, refund, monthlypension, choiceopt) VALUES (" & vempno & ",'" & vempname & "', '" & vdesign & "', '" & vsex & "', '" & vgrade & "', '" & vcategory & "', to_date('" & vdobdd & "/" & vdobmm & "/" & vdobyyyy & "'), to_date('" & vdojdd & "/" & vdojmm & "/" & vdojyyyy & "'), to_date('" & vdosdd & "/" & vdosmm & "/" & vdosyyyy & "'), to_date('" & vndosdd & "/" & vndosmm & "/" & vndosyyyy & "'), to_date('" & vdoadd & "/" & vdoamm & "/" & vdoayyyy & "'), to_date('" & vdojgrdd & "/" & vdojgrmm & "/" & vdojgryyyy & "'), '" & vreason & "', '" & voption & "', '" & vcommutation & "', '" & vrehabilitation & "', " &vbasic2003 & ", " &vstag2003 & ", " & vpersonalpay2003 & ", " & vsplpay2003 & ", " & vadhoc2003 & ", " & vnpa2003 & ", " & vda2003 & ", " & vprotectpay2003 & ", " & vbasic & ", " & vstag & ", " & vpersonalpay & ", " & vsplpay & ", " & vadhoc & ", " & vnpa & ", " & vda & ", " & vprotectpay & ", '" & vbeneficiaryspouse & "', to_date('" & vdobosdd & "/" & vdobosmm & "/" & vdobosyyyy & "'), '" & valtnominee1 & "', '" & valtnominee2 & "', '" & valtnominee3 & "', '" & valtnominee4 & "', '" & valtnominee5 & "', '" & valtnominee6 & "', '" & vaddress & "', '" & vcontact & "', '" & vassesseno & "', '" & vannuityno & "', " & vannuityamt & ", " & v1third & ", " & vrefund & ", " & vmonthlypension & ", '" & vchoiceopt & "')"
Conn.Execute SQL
Comment