Skip to main content

Hi,


 I have mutiple records in a table with an Autonumber as the primary key.


 How would I go about updating a number of those records using a smartobject/service method.


Eg:


TableID - Autonumber


Field1 - Number


Field2 - Text


Field3 - Date


Field4 - Number


Normal SQL Server syntax would be:


Update MyTable SET Field1 = 5, Field2 = 'Updated' WHERE Field4 = 67 AND Date >= '2009-01-01'


I tried similiar syntax with K2 and it created a new record and did not update the existing records.


 I would imagine the delete syntax would have a similar problem??? 


 

Are you using the Dynamic SQL Service object from the BlackMarket?  If so I don't believe that functionality was implemented.  You would probably need to create your own service method to achieve this. The other option is to loop through the data set calling the standard update method for each item. 


-Eric 


You would have to specify the TableID in your SmartObject update call, or else it will assume you wanted to create a new record

Reply