Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update doesn't work
Message
From
17/10/2007 14:54:41
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Update doesn't work
Miscellaneous
Thread ID:
01261596
Message ID:
01261596
Views:
38
Why is it that a code section will work fine in one instance and not in another???? That's retorical I guess. AAARGH!!

This code section runs fine without errors but the new values that are supposed to be saved into TIP are not saved. Can anyone tell me why? This same code seems to work fine in another page. It's not file permissions because it works on the other page.
<%
   Set oConnection = Server.CreateObject("ADODB.Connection")
   with oConnection
	 .ConnectionString = "Provider=VFPOLEDB;Data source=" & session("fileloc")
	 .Mode = 16 'adModeShareDenyNone - this is value of adModeShareDenyNone constant
	 .Open
	 .CursorLocation = adUseClient
	 .Execute ("set null off")
   end with   
' Update the TIP table
           Set oProject = Server.CreateObject("ADODB.Recordset")
	   sql="select * from web_edits_tip where not processed"
	   set oEdits = oConnection.Execute(sql)
	   while not oEdits.eof
	   		 lnTIP_ID = oEdits("tip_id").value
			 lcTIP_ID = trim(cstr(lnTIP_ID))
	   		 sql = "select tip_id, st_name, contact, phone "
	 		 sql = sql + "from tip where tip_id = " & lctip_id
			
			 oProject.Open sql, oConnection, adOpenKeyset, adLockBatchOptimistic, adCmdText
			 with oProject
			 	  'These just show the values that are being processed
                                  response.write(oEdits("contact").value + "<br>")
				  response.write(oProject("contact").value + "<br>")
				  .fields("contact").value = oEdits("contact").value
			          response.write(oEdits("contact").value + "<br>")
				  response.write(oProject("contact").value + "<br>")
	   			  
                                  .fields("phone").value = oEdits("phone").value
				  .updatebatch
				  .close
			end with	  
	   	   oEdits.movenext
		wend
		oEdits.close
The responsewrites show that the new value has been assigned but for some reason the save is not taking. Any help here will be appreciated.
Thanks
Reply
Map
View

Click here to load this message in the networking platform