Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: update statement


Message #1 by "microman microman" <microfredo@m...> on Mon, 13 Jan 2003 20:49:48 +0000
Hi,
I have an update statement which doesn't update. The code is posted below. Would appreciate it if someone could detect the error. It
gives me no error. It just doesn't update. \
Thanks
anjali
objRS.Open "India", strConnect
 strConnect.Execute "update India Set " _ 
& "First_Name = '" & Request.Form("firstName") & "', " _
 & "Last_Name = '" & Request.Form("lastname") & "', " _ 
& "TelePhone = '" & Request.Form("phonenum") & "', " _
 & "Email = '" & Request.Form("email") & "', " _ 
& "Num_In_Family = '" & Request.Form("numinfamily") & "', " _
 & "New_Immig = '" & Request.Form("newimmi") & "', " _ 
& "Foreign_Visi = '" & Request.Form("foreignvisi") & "', " _ 
& "Signs = '" & Request.Form("signs") & "', " _ 
& "Contact_Info = '" & Request.Form("contacts") & "', " _ 
& "where ID_Num = " & Request.Form("ID_Num") 
Response.Redirect "./EditMenu.asp"


Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
Message #2 by "sashidhar" <sashi@a...> on Thu, 16 Jan 2003 10:21:18
here is the sample code for update statement
<%
'create DSN 'hello'
set con=server.CreateObject("adodb.connection")
con.Open "hello"  
con.Execute "update login set pwd='xyz' where uid='abc' "
Response.Write "data updated"
%>
in ur sample code two things might wrong

i.e name of the DSN
or the sql query 
try to print out the sql statement through
response.write and check the quey

  Return to Index