Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating Data from the Web
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Updating Data from the Web
Miscellaneous
Thread ID:
00549219
Message ID:
00549219
Views:
33
Hi Folks,

I posted a message a couple of weeks ago about updating an ADO recordset created by a business object. I was able to update the data using the business object as both a class and a COM object using VFP. However, I was not able to do so using ASP. I checked for any error messages that might have been reported during the Save, but there were none. The business object reported that everything was fine, even though my table did not get updated. Here's the ASP code I posted earlier with Victor's suggestions. It seems to me that the business object thinks that no data was changed so it didn't update the table. Any help would be greatly appreciated.


var oPerson = Server.createobject('odsweb.person');

// Set data format as ADO.
oPerson.SetDataFormat(1);

// Retrieve record
oPerson.GetPerson(2);

// Retrieve the ADO recordset.
var rs = oPerson.GetDataX()

// Update a field. Original value is 'George'
rs.Fields('first').Value = 'Georgie Porgie';

// Send the recordset back to business object.
oPerson.SetDataX(rs);

// Save the changes.
var cerr = oPerson.Save();

// Check to see if everything went well
if cerr < 0
var nerrcnt = oPerson.GetErrorCount()
For i = 1 to nerrcnt
Response.Write(oPerson.GetError(nerrcnt))
Next i
Response.Flush
endif
Next
Reply
Map
View

Click here to load this message in the networking platform