It depends on which ODBC driver you are using. The Microsoft drivers work with the CALL syntax, the Oracle ones don't. (The latest Oracle drivers have a SQL-server workaround to enable CALL syntax - haven't tried this).
Both drivers will work with this work around:
=SQLEXEC(h, 'begin SP_MYPROC ; end;)
Basically, what you are doing is sending down an PL/SQL anonymous block. You can test it in SQL*Plus:
SQL> begin
2 sp_myproc ;
3 end ;
4 /
If you want to run a stored procedure/package that returns results, there is a complex syntax that only works on the MS drivers. I can try to dig it out if you need it, but I hope (for your sake) not :)
HTH
Les
>I did not try with SPT but I did it successfully with ADO. Maybe you could try this :
>
>*************************************
>** Description of variables used **
>* h = handle
>* ORADSN = datasource name
>* USERID = user id
>* PWD = password
>**************************************
>
> h=SQLConnect("ORADSN","USERID","PWD") && Establish a connection
>
> IF h > 0
>
> WAIT WINDOW "Connection Successful" NOWAIT
> =SQLExec(h,"{Call SP_MYPROC}") && Execute the stored procedure
> =SQLDisconnect(h) && Terminate the connection
>
> ELSE
>
> WAIT WINDOW "Connection Failed"
>
> ENDIF
>I found it on MSDN.
>
>HTH,
>Christian Cote
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only