If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Informix Stored Procedures

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-25-03, 02:52
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Informix Stored Procedures

Dear All,

I need some help on stored procedures, whether we can use dynamic sql in procedures. My query is say i have a table test1 with 2 columns, I want to create a stored procedure where my user will only supply the values to me, i will enter the insert/update statements in the backend in my procedures. for eg. if the user wants to insert values thru java, he will pass the string & values to me thru the procedure, he will not write insert statements, based on that values i will insert data thru procedures to my table. Basically we do not want the user to write insert/update codes. Pls. let me know if its possible in stored procedure, as it is possible in other RDBMS. If its not possible in informix how can we do it, is it thru 4gl or esqlc. Please advice. I would appreciate your prompt reply.

Best Regards,

lloyd
Reply With Quote
  #2 (permalink)  
Old 08-26-03, 16:20
ghed ghed is offline
Registered User
 
Join Date: Nov 2002
Posts: 11
If you are using informix 9.1 and above, I think this feature is supported using Datablade (you will need to download and set this up on the server to make it work). You will also need to download also the docs (google: informix datablade) to understand how to implement this.

Informix 4GL supports dynamic SQL (prepared statements), although I'm not sure on how you are going to call the 4GL from your client.

You can also create multiple SPs to achieve this restriction, something like:

procedure add_user(col1 char(8), col2...)
insert into progusr
values (col1, col2, ...);
end procedure;

procedure del_user(...

procedure open_account(...

procedure close_account(...

Hope this helps.
Reply With Quote
  #3 (permalink)  
Old 08-26-03, 23:25
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Quote:
Originally posted by ghed
If you are using informix 9.1 and above, I think this feature is supported using Datablade (you will need to download and set this up on the server to make it work). You will also need to download also the docs (google: informix datablade) to understand how to implement this.

Informix 4GL supports dynamic SQL (prepared statements), although I'm not sure on how you are going to call the 4GL from your client.

You can also create multiple SPs to achieve this restriction, something like:

procedure add_user(col1 char(8), col2...)
insert into progusr
values (col1, col2, ...);
end procedure;

procedure del_user(...

procedure open_account(...

procedure close_account(...

Hope this helps.
Hi Ghed,

Thanks once again for your feedback, even i read about datablades, but then that would be in unix env since it uses c prgs.

Best Regards,

lloyd
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On