I have one table in sql, Defined as follows.
CREATE TABLE [dbo].[field_detail] (
[app_id] [numeric](18, 0) NOT NULL ,
[fieldnm] [varchar] (50) NULL ,
[field_web] [varchar] (50) NULL ,
[bus_type] [varchar] (50) NULL ,
[type_of_act] [varchar] (50) NULL ,
[no_of_catagory] [numeric](18, 0) NULL ,
[fields_no] [numeric](18, 0) NULL ,
[field_id] [int] IDENTITY (1, 1) NOT NULL
)
when I insert data from asp page it inserts the date but update statement is not working.
strSQL=”insert into field_detail values(” & session(“app_no”) & “,'” & nmfield & “‘,'” & fiweb & “‘,'” & busntype & “‘,'” & actitype & “‘,” & noofcat & “,” & fieldno & “)”
db.Execute strsql
Response.Write(“record is inserted & app_no = ” & session(“app_no”))
else
strsql =”update field_detail set fieldnm ='” & nmfield & “‘,field_web ='” & fiweb & “‘,bus_type ='” & busntype & “‘,type_of_act ='” & actitype & “‘,no_of_catagory =” & noofcat & ” where app_id =” & zz & ” and fields_no =” & b & “”
Response.Write strsql
db.Execute strSQL
Please reply