Solved

using AsMemo and Text var in SQL and returning a dataset error

Posted on 2003-12-09
3
391 Views
Last Modified: 2008-02-01
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!
0
Comment
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 250 total points
ID: 9910291
as you get no resultset back from the storedProcedure
(get only a flag (success/error) back) you can't use open.

-> use execute instead and after this read-out the returnvalue

meikl ;-)
0
 

Author Comment

by:dabestprogrammerindauniverse
ID: 9910329
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?

0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9910385
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 ;-)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now