Create/Update method in Smart objects for Oracle tables without Primary Keys

  • 8 January 2014
  • 1 reply
  • 7 views

Badge +2

Hi,


Is there a way to insert/update data in oracle tables without primary keys using K2 smartobjects/smartforms?


I have a form that displays employee data. We are displaying the data from oracle tables. Our tables dont have primary keys but have unique indexes. Now, even though we dont have primary keys, I am using list method with input parameters to display a single record based on employee ID. I would like to update data for that record using K2 Smarforms.


When I try to update my smartform, I get the following error.


ORA 00936 : Missing Expression.


I have been researching on this issue and I found that for oracle service broker, All the CRUD (CREATE, READ, UPDATE, DELETE) methods including LIST will only be created as Service Object methods only if there is a primary key on the table. Without a PK, only LIST method will be created.


I was wondering if there is a solution or workaround for this issue.


thanks,


Madhuri.


1 reply

Badge +3

Create a stored procedure to do your updates and then add that as another method to your smartobject.  Passing in the fields you want to update. 

Reply