Can you not also use something like:
select theFunction(value) from dual;
(Dual is a dummy table in Oracle)
>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement