HOWTO: Calculate primary key inside the insert stored procedure
Hi all We are trying to insert objects into the table using OJB through some stored procedure (MS SQL 2000) _without_ specifying the primary key (so initially it is null). The key is supposed to be calculated inside the stored procedure. Unfortunately, we get exception assertValidPkFields - it seems OJB requires us to specify the primary key before actual insert operation. Is there workaround for this situation? We realize that probably we are doing some strange thing but still... I use OJB from CVS. TIA, Sergey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HOWTO: Calculate primary key inside the insert stored procedure
Hi Sergey, Did you tried to set field as read-only? access = read-only OJB version? regards, Armin Sergey V. Oudaltsov wrote: Hi all We are trying to insert objects into the table using OJB through some stored procedure (MS SQL 2000) _without_ specifying the primary key (so initially it is null). The key is supposed to be calculated inside the stored procedure. Unfortunately, we get exception assertValidPkFields - it seems OJB requires us to specify the primary key before actual insert operation. Is there workaround for this situation? We realize that probably we are doing some strange thing but still... I use OJB from CVS. TIA, Sergey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HOWTO: Calculate primary key inside the insert stored procedure
sorry i mean access = readonly without dash Armin Sergey V. Oudaltsov wrote: Did you tried to set field as read-only? access = read-only Not yet. I will though. Right now. OJB version? Straight from CVS HEAD (well, yesterday) Thanks for the idea, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]