×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Use the Adapter DB with Stored Proc with parameters input and output

Use the Adapter DB with Stored Proc with parameters input and output

Use the Adapter DB with Stored Proc with parameters input and output

(OP)
Hello,

We want to use adapter DATABASE most natively as possible because we gains performances with this process.
( example stored procedure @Proto_wtx_cht10dbout_integrer( @param1 char(4) input, @param2 varchar input, @param1 int output )
I do not want to use DBLOOKUP or DBQUERY.
I can retrieve the retun value with this format ( -MDQ E: \ APPLI \ ad_ \ w2 \ mdq \ ad_acces_db.mdq -DBNAME ad_rpsit_aa -PROC Proto_wtx_cht10dbout_integrer -TRACE ).
But I can't retrieve the output parameter value of this stored procedure.
Could you create a type tree dedicated to recover the value output by catch mecanism ?
 
Thank

RE: Use the Adapter DB with Stored Proc with parameters input and output

the easiest way to do it is to use DBLOOKUP or DBQUERY - why can't you use them?

the alternative is to have a parent map build the adapter string (so that you can populate the input variables) and override the input of the child map, so the child map gets the results of the DB procedure call.

if the procedure is called using an output card you won't be able to get back the results.

RE: Use the Adapter DB with Stored Proc with parameters input and output

(OP)
I don't want to work with DBLOOKUP / DBQUERY for reasons of performance gains. When you use the Database adapter ( DATABASE ), the process is faster.
I want to handle errors in the stored procedure.
Thanks for the information, OllyC. I will try with this syntax: =PUT("DB","-MDQ E:\APPLI\ak_\w1\mdq\ak_acces_db.mdq -DBNAME ad_rpsit_aa -PROC proto_wtx_cht10dbout_integrer -TRACE",PACKAGE( ligne:ce_proto_wtx ))    

Benoxy

RE: Use the Adapter DB with Stored Proc with parameters input and output

AFAIK DBLOOKUP and DBQUERY are the same speed as using input / output cards (or the GET/PUT functions) - why do you think they are slower?

RE: Use the Adapter DB with Stored Proc with parameters input and output

(OP)
I measured the execution time with adaptor DATABASE under these conditions :
* Turn on the output card DATABASE option
* Include in the output card this script line: - MDQ E:\APPLI\ak_\ w1 \ mdq \ ak_acces_db.mdq - DBNAME ad_rpsit_aa - PROC proto_wtx_cht10dbout_integrer -TRACE.

I obtain better times with this use

Example:
For an insertion of 10000 recordings, using the DBLOOKUP, the treatment lasts 2 minute. With the DATABASE I obtain 7s

RE: Use the Adapter DB with Stored Proc with parameters input and output

What were the parameters to DBLOOKUP? Were you committing after each row? I would have thought with the same parameters the process time should be very similar.

RE: Use the Adapter DB with Stored Proc with parameters input and output

(OP)
=DBLOOKUP("call ?=proto_wtx_chantier10_integrer('" + co_wtx_message:ce_f_proto_wtx + "', '"
                         + lb_wtx_message:ce_f_proto_wtx + "',?)",
             "-MDQ E:\APPLI\ad_\w2\mdq\ad_acces_db.mdq -DBNAME ad_rpsit_aa")

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close