Link to home
Start Free TrialLog in
Avatar of dabestprogrammerindauniverse
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!
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dabestprogrammerindauniverse
dabestprogrammerindauniverse

ASKER

Hi,
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?

depending what connectionType (ado/bde/other) u use

a sample using ado


//filling input Parameters (sample-names)
ADOStoredProc1.ParamByName('AParameterName').Value := Whatever;
//calling StoredProc
ADOStoredProc1.ExecProc;
//read-Out ReturnValue
result := ADOStoredProc1.ParamByName('ReturnValue').Value;
if Result = 'SUCCESS' then
...

just from head

meikl ;-)