VB code for calling SP

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

VB code for calling SP

Post by snassimr »

Hi!

Does anybode can show me the code for calling Stored procedure on SQL Server.

I need help with this.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Do you really mean from VB(Visual Basic)???
In DS you can try using the ODBC stored procedure or simly run a user defined sql to run it.
(depending on wether it has a result set or not might determin if you need to use an output or input link.

IHTH,
Last edited by roy on Mon Jun 27, 2005 3:05 am, edited 1 time in total.
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

What stage are you using to load data into SQL server. The stored procedure can be called if the stage has 'Before/After' tabs in the SQL tab. The stage does not have the above options, then you may need to write a routine to call SP. I think Stored procedure in DS supports only Oracle, DB2 & Sybase databases.

Hope you can call the SP using call command. (Call <SP Name>)

HTWH.

Regards
Saravanan
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Why not use a shell script or a batch file?
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah, deja-vu all over again. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

To invoke a stored procedure from DataStage you must first import the stored procedure definition. If DataStage objects to the import process, then the stored procedure is not amenable to DataStage's method of operation (it must process a record set).
See also this post
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply