A
Adrian
Hi,
I have an ASP page on an intranet IIS server that posts data via a
System DSN to an Access DB, normally it works fine however sometimes it
returns 0 for success but no data is added to the DB!?
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=testmain"
sql="Insert Into testtable (Survey_1,Survey_2)
VALUES ("
sql=sql & "'" & Request.Form("Survey_1") & "',"
sql=sql & "'" & Request.Form("Survey_2") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write(" Survey NOT Added! ")
else
Response.Write("<h3>" & recaffected & " Survey Added </h3>")
end if
conn.close
Set conn = Nothing
%>
The above is cut down version as there are a lot of fields!
Anyone know why it would return 0 sometimes but not add the data?
thanks
Adrian
I have an ASP page on an intranet IIS server that posts data via a
System DSN to an Access DB, normally it works fine however sometimes it
returns 0 for success but no data is added to the DB!?
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=testmain"
sql="Insert Into testtable (Survey_1,Survey_2)
VALUES ("
sql=sql & "'" & Request.Form("Survey_1") & "',"
sql=sql & "'" & Request.Form("Survey_2") & "')"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write(" Survey NOT Added! ")
else
Response.Write("<h3>" & recaffected & " Survey Added </h3>")
end if
conn.close
Set conn = Nothing
%>
The above is cut down version as there are a lot of fields!
Anyone know why it would return 0 sometimes but not add the data?
thanks
Adrian