SQL error?

J

Jerome

Hi,

I've got the following code but my records don't get updated ... Is
anyone seeing why? Just looking at the code? Any help is appreciated!

Jerome

<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim strSQL 'Holds the SQL query to query the database

Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DSN=IntranetDB"

NewsInt=request.querystring("textfield")

strSQL="UPDATE activites_edu_bkp SET "
strSQL= strSQL & "testfeld='yes'"
strSQL= strSQL & " WHERE news='" & NewsInt & "'"
on error resume next
adoCon.Execute sql
if err<>0 then
response.write( "*" & NewsInt & "No update permissions!")
else
response.write("Records for " & NewsInt & " updated!")
end if
adoCon.close
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top