Forums
 This topic is locked 
             SQL update
 Posted 22 Jun 2001  10:51:07 
  1 
     has   voted 
  22 Jun 2001  10:51:07 gianluca jean posted: 
 I want update more field, I have used one page where I take the value of ID by checkbox and another page where run the SQL to update the Yes/no field I don't understand, but I receive a sintax error on sql stantement
thanks to all
this is the code of update page
<% dim num
dim xide
dim whr
dim sql
whr=""
xide=split(request.querystring("checkbox"
for each num in xide
if whr<>"" then whr=whr & " or "
whr=whr & "ID=" & num
next
sql="UPDATE T_attivita SET T_attivita.vedi = No WHERE "
sql=sql & whr
%>
<%
set Command1 = Server.CreateObject("ADODB.Command"
Command1.ActiveConnection = MM_biblio1_STRING
Command1.CommandText = sql
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
Replies
 Replied 22 Jun 2001  11:08:12 
   22 Jun 2001  11:08:12 michael vASS replied: 
  what you have to do is go back into the server behaviours and click on the insert record behaviour that you created and edit.
what happens is some time if you dont label your fields the same as your form elements dw4 doesnt know where to connect them. so you have to edit to make sure ueach one is done.
hope this helps
  
  what happens is some time if you dont label your fields the same as your form elements dw4 doesnt know where to connect them. so you have to edit to make sure ueach one is done.
hope this helps