Stored Procedure

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

celfyn
Ebase User
Posts: 2
Joined: Tue Jun 29, 2010 3:09 pm
Location: Wales, UK

Stored Procedure

#1

Postby celfyn » Mon Jul 12, 2010 9:18 am

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!
0 x

Who is online

Users browsing this forum: No registered users and 109 guests