Solved

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

Posted on 2003-12-09
3
395 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to convert wav to mp3 in delphi 9 219
Printing problem 2 101
Delphi 2 68
How to remove Recent Projects from Embarcadero C++ builder XE10. Berlin 2 66
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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

808 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