celfyn Ebase User
Joined: 29 Jun 2010 Posts: 2 Location: Wales, UK
|
Posted: Mon Jul 12, 2010 9:18 am Post subject: Stored Procedure |
|
|
Good morning,
Just setting out using Ebase v4 and trying to insert an item into an SQL2005 database with a stored procedure.
Here is the tables structure:
tbl_language
------------
language_id int PRIMARY KEY auto_increment
language_name varchar
tbl_area
------------
area_id int PRIMARY KEY auto_increment
is_live bit
tbl_area_language
-----------------
area_language_id int PRIMARY KEY auto_increment
area_id int [FK tbl_area.area_id]
language_id int [FK tbl_language.language_id]
area_name varchar
What I'm trying to achieve is to insert an item into the table 'tbl_area', retrieve the generated id, then insert the relevant information and the generated id into the table tbl_area_language.
Is there a way of doing this? Have tried to create a stored proc with one input and one output parameter and then calling it in a script with the exec command.
This doesn't work, it generates the following error:
SQL error executing stored procedure PRAWF The executeUpdate method must not return a result set.
Would this be possible using sequence? If so, how would it work seeing that my tables have auto generated id’s?
Thank you! |
|