Thank you markrawlingson..
this is the sql command i got error from tis line.following is the code for updating and inserting records in table
[conn.execute " update enquiry set Etype='" & text(1) & "', regid ='" & text(2) & "', cname='" & text(3) & "', address='" & text(4) & "', salesperson='" & text(5) & "', through='" & text(6) & "', contactperson='" & text(7) & "',phoff='" & text(8) & "',phres='" & text(9) & "', mobile=" & text(10) & ",faxno='" & text(11) & "', email='" & text(12) & "', edate='" & text(13)& "', etime='" & cdate(text(14)) & "', thruby='" & text(15) & "', dob='" & text(16) & "', anniversarydate='" & text(17) & "', refby='" & text(18) & "', segmentname='" & text(19) & "',enquirytype='" & text(20) & "', branchid='" & text(21) & "' where regid= '" & text(2) & "' and branchid='" & text(21) & "' "]
[conn.execute "insert into enquiry values('" & text(1) & "', '" & text(2) & "', '" & text(3) & "', '" & text(4) & "', '" & text(5) & "', '" & text(6) & "', '" & text(7) & "', '" & text(8) & "', '" & text(9) & "', " & text(10) & ", '" & text(11) & "', '" & text(12) & "', '" & text(13) & "','" & cdate(text(14)) & "', '" & text(15) & "','" & text(16) & "', '" & text(17) & "', '" & text(18) & "', '" & text(19) & "', '" & text(20) & "', '" & text(21) & "') "]
'
Because the syntax of your SQL statement is incorrect.
Show us your SQL statement so we can see it and possibly point out your error.
In addition, whenever you face a problem like this it's a good idea to Response.Write your SQL statement to see what it REALLY says.
Sincerely,
Mark