Ebase Technology Forum Index Ebase Technology Forum

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stored Procedure

 
Post new topic   Reply to topic    Ebase Technology Forum Index -> Databases with Ebase
View previous topic :: View next topic  
Author Message
celfyn
Ebase User


Joined: 29 Jun 2010
Posts: 2
Location: Wales, UK

PostPosted: Mon Jul 12, 2010 9:18 am    Post subject: Stored Procedure Reply with quote

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!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Ebase Technology Forum Index -> Databases with Ebase All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group