Web Connection
Unable to update the Business Object
Gravatar is a globally recognized avatar based on your email address. Unable to update the Business Object
  Chris Jewell
  All
  Mar 25, 2019 @ 06:07am

Hello,

I'm following through the wwbusiness object step by step guide and I have created a cCustomer business object without errors, but when I try to update a record I always receive a response of false, it feels like the object is read-only or something, any ideas would be gratefully received?

Code example :

DO cCustomer

loCust = CREATEOBJECT("cCustomer")

loCust.nDataMode = 0 && Foxpro data

loCust.nUpdateMode = 1 && Update Mode

loCust.Load(5136)

?loCust.oData.PK_ID && Displays: 5136

?loCust.oData.name && Displays: 4J Solutions

?loCust.oData.name = "Test Company" && Displays: .f.

?loCust.oData.name && Still Displays: 4J Solutions

I'm using free-standing VFP tables in a separate data folder. Thank you.

Gravatar is a globally recognized avatar based on your email address. re: Unable to update the Business Object
  Tore Bleken
  Chris Jewell
  Mar 25, 2019 @ 06:27am

Remove the question mark when you want to change the value!

Gravatar is a globally recognized avatar based on your email address. re: Unable to update the Business Object
  Chris Jewell
  Tore Bleken
  Mar 25, 2019 @ 06:30am

omg....sorry should have thought of that! Thank you 😃

Gravatar is a globally recognized avatar based on your email address. re: Unable to update the Business Object
  Tore Bleken
  Chris Jewell
  Mar 25, 2019 @ 06:39am

It's called Monday... 😃

© 1996-2024