Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass by Ref Error w/Oracle Package
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00621675
Message ID:
00625110
Views:
12
>>You can get a cursor back from a SP as we have shown elsewhere here.
>
>Thanks, Mark. I suppose more searching is in order because the only thread I've seen here WRT getting a cursor back from an Oracle SP is the #621675 one where you were getting the same error that I am -- "PLS-00306: wrong number or types of arguments in call to 'GetByPK' ORA-06559: line 1, column 7: PL/SQL: Statement ignored." It ended with Larry Miller saying he is going to check into it with his DBA.
>
>I get that error even with the code you supplied, which is what I had already tried. What version of the MS ODBC Driver for Oracle are you using, if you don't mind?
>

Kelly,
I don't see any reason why the same syntax shouldn't work for both GetByPK and GetAll. You could also make it the same procedure and make the IN parameter optional with a default of NULL. If it's NULL, do a select all instead of filtering it with a WHERE clause. It looks like you have limited the amount of data that can be returned. Change the call to:
cSQL = [{call Test_Data.GetAll({resultset 100000,npk,ctestchar, ctestvc2, dtestdate, ntestdecimal})}]
? sqlexec(xx, cSQL, "c_test")
The first number in the resultset determines the number of rows returned. I don't know if 100,000 is permissible. I have only tested using up to 12000 without any problems. This technique returns 9955 rows from Oracle on a 10MBit connection in about 1.3 seconds. The same query using a Ref Cursor and the Oracle ODBC driver takes 14 seconds.

BTW, I am using Microsft ODBC for Oracle driver version 2.573.7713.00.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform