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.CreateOb ject("ADODB.Con nection")
conn.Open "DSN=testma in"
sql="Insert Into testtable (Survey_1,Surve y_2)
VALUES ("
sql=sql & "'" & Request.Form("S urvey_1") & "',"
sql=sql & "'" & Request.Form("S urvey_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.CreateOb ject("ADODB.Con nection")
conn.Open "DSN=testma in"
sql="Insert Into testtable (Survey_1,Surve y_2)
VALUES ("
sql=sql & "'" & Request.Form("S urvey_1") & "',"
sql=sql & "'" & Request.Form("S urvey_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
Comment