dabestprogrammerindauniverse
asked on
using AsMemo and Text var in SQL and returning a dataset error
Hi,
I have a data which exceeds the SQL limit for a varchar which is 8000 so i decided to use the Text variable instead for my table. As input parameter, i used AsMemo. The stored procedure that i called to which i pass the AsMemo param should return a simple "select 'SUCCESS' " or " select 'Error' " after i call "Open". But instead i get an error saying "error creating cursor handle.". why is this? any solution ot my problem?
thanks in advance!
I have a data which exceeds the SQL limit for a varchar which is 8000 so i decided to use the Text variable instead for my table. As input parameter, i used AsMemo. The stored procedure that i called to which i pass the AsMemo param should return a simple "select 'SUCCESS' " or " select 'Error' " after i call "Open". But instead i get an error saying "error creating cursor handle.". why is this? any solution ot my problem?
thanks in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
depending what connectionType (ado/bde/other) u use
a sample using ado
//filling input Parameters (sample-names)
ADOStoredProc1.ParamByName ('AParamet erName').V alue := Whatever;
//calling StoredProc
ADOStoredProc1.ExecProc;
//read-Out ReturnValue
result := ADOStoredProc1.ParamByName ('ReturnVa lue').Valu e;
if Result = 'SUCCESS' then
...
just from head
meikl ;-)
a sample using ado
//filling input Parameters (sample-names)
ADOStoredProc1.ParamByName
//calling StoredProc
ADOStoredProc1.ExecProc;
//read-Out ReturnValue
result := ADOStoredProc1.ParamByName
if Result = 'SUCCESS' then
...
just from head
meikl ;-)
ASKER
there should be a result since at the end of the stored proc i have the either select 'Success' or select 'Error.'
what do you mean by:
-> use execute instead and after this read-out the returnvalue
how do i execute and read the return value?