🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3345

How to retrieve results fromTADOStoredProc?

#3345
From: Changsong Bu
Date: Fri, 04 Oct 2002 15:37
47 lines
2651 bytes
I just switched from BDE to ADO and the infomration from online 
help is very limited. 

I need to retrive a result set with a raw field from Oracle 
Databse in TADOStoredProc. How shall I specify the parameter for 
the result set? This is my codes:

-------------------------------------------
    ADOStoredProc1->Parameters->Clear();

    ADOStoredProc1->ProcedureName = "BLOBTEST.GETTBBLOB";
    ADOStoredProc1->Parameters->CreateParameter("V_C1", ftInteger, pdInput, 0, NULL);
    ADOStoredProc1->Parameters->CreateParameter("v_DataCursor", ftCursor, pdReturnValue, 0, NULL);

    ADOStoredProc1->Parameters->ParamByName("V_C1")->Value = 23;

    ADOStoredProc1->Open();
-----------------------------------------------------

I assume I was not doing the right thing since I got an error
 when I tried to Open() the stored procedureJ: "Parameter Object 
is improperly defined. Inconsistant or incomplete information is 
provided."

I also tried to have my stored procedure to return an out value
 instead of the result set (assuming there will be only one 
record). But then I had a problem with the raw field type.

-----------------------------

    ADOStoredProc1->Parameters->Clear();
    ADOStoredProc1->ProcedureName = "BLOBTEST.GETTBRAW";
    ADOStoredProc1->Parameters->CreateParameter("V_C1", ftInteger, pdInput, 0, NULL);
    ADOStoredProc1->Parameters->CreateParameter("v_C2", ftOraBlob, pdOutput, 2147483647, NULL);

    ADOStoredProc1->Parameters->ParamByName("V_C1")->Value = 23;

    ADOStoredProc1->ExecProc();
-----------------------------------------------
I got the same error message.

What is the right way to do? Is there any place I can find some sample codes? 

Thanks a lot.

Changsong
Technical Details
Message-ID: <3d9db59d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,1a14611dc31b7cea,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-10-04 08:42:07 PST
From: "Changsong Bu" <changsong.bu@ps.ge.com>
Sender: "Changsong Bu" <changsong.bu@ps.ge.com>
Reply-To: "Changsong Bu" <changsong.bu@ps.ge.com>
Subject: How to retrieve results fromTADOStoredProc?
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 12.36.152.153 12.36.152.153    
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3d9db59d$1@newsgroups.borland.com>
Date: 4 Oct 2002 08:37:01 -0700
X-Trace: newsgroups.borland.com 1033745821 207.105.83.65 (4 Oct 2002 08:37:01 -0700)
Lines: 47
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail