Article View: borland.public.cppbuilder.database.ado
Article #1081Re: ResultSet NOT supported !
From: Diego Scaravaggi
Date: Wed, 17 Nov 2004 15:57
Date: Wed, 17 Nov 2004 15:57
110 lines
4605 bytes
4605 bytes
After some hour into VCL debug :
VCL wrapper code suppose always to use prepared command except for:
cmdFile and cmdTableDirect.
DynamicResultSet like Oracle REF CURSOR.
It would be great to add a property EnableResultSet and override this
code!!!
------------------------
procedure InitializeConnection;
var
UseCommand: Boolean;
begin
{ Async operations require a connection component so we can hook
events }
if not Assigned(Connection) and (ExecuteOptions * AsyncOptions <> [])
then
DatabaseError(SConnectionRequired);
FConnectionChanged := False;
ActiveConnection := EmptyParam;
UseCommand := not (CommandType in RSOnlyCommandTypes);
if UseCommand then
begin
SetConnectionFlag(cfOpen, True);
Command.Initialize;
InitializeMasterFields(Self);
Source := Command.CommandObject;
end else
begin
{ Can't use command for cmdFile and cmdTableDirect }
--->> { cmdText of Dynamic ResulSet cannot be use in AdoCommand too }
--->>
if Assigned(Connection) then
begin
Connection.Open;
ActiveConnection := Connection.ConnectionObject;
end else if ConnectionString <> '' then
ActiveConnection := ConnectionString;
Command.CheckCommandText;
Source := CommandText;
end;
end;
------------------------------------------
"Diego Scaravaggi" <Diego.Scaravaggi@txt.it> wrote in message
news:419b1586$1@newsgroups.borland.com...
> Hallo,
>
> I'm using c++ builder with ADODB vcl unit from Borland
>
> I got "unspecified error" running this query:
>
> sql = " {call ReadMeasureData( 57223, 67, 279, {resultset 0,
> result_set_arg})} "
>
> note that VBA excel code referencing ADO 2.7 com objects works well:
> ------------- Excel VBA code -------------------
>
> sql = " {call ReadMeasureData( 57223, 67, 279, {resultset 0,
> result_set_arg})} "
> 'm_Connection.Properties("PLSQLRSet") = True 'only for oracle oledb not
> required by msdaora
> runSQL = sql
> m_rsBrand.CursorLocation = adUseServer 'adUseClient ' adUseServer
> m_rsBrand.Open runSQL, m_Connection, adOpenForwardOnly, adLockReadOnly,
> adCmdText
> ---------------------------------------------------
>
> After in my C++ builder application I start debug session with VCL debug,
> I got Com exception in:
>
> ---------- VCL Unit ADODB ---------------------
> Recordset.Open(Source, ActiveConnection,
> CursorTypeValues[FCursorType], LockTypeValues[FLockType],
> Integer(CommandTypeValues[CommandType]) +
> ExecuteOptionsToOrd(ExecuteOptions));
> -----------------------------------------------
>
> with evaluate/inspect I got:
> FCursorType = adOpenForwardOnly
> FLockType = adLockReadOnly
> CommandType = adCmdText
> ExecuteOptions = '\0' // empty
>
>
> Recordset cannot be depth inspected because is COM intf
> How can I discover which COM typelib is binded to this intf ?
>
> Is it possible that ADODB unit is referencing some old ADO GUUID (2.0,
2.1,
> 2.5, 2.5 sp1) instead of 2.7
> I know that ResultSet with MSDAORA works well only from 2.5
>
>
> Should I avoid original VCL adodb unit for some thirty part Delphi ADO
> wrapper ?
>
> Thanx a lot
>
> --
> Scaravaggi Diego T X T e - s o l u t i o n s
> work: +390225771249 mobile: +393485266985
> work address: office 305 via Frigia, 27 20126 Milano (MI) Italy
> Milano - Barcelona - Frankfurt - London - Paris
>
>
Technical Details
Message-ID:
<419b74fc@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<419b1586$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,4942e8f095df3307 X-Google-Thread: f5cad,4942e8f095df3307 X-Google-Attributes: gid10698b,gidf5cad,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Diego Scaravaggi" <Diego.Scaravaggi@txtgroup.com> From: "Diego Scaravaggi" <Diego.Scaravaggi@txt.it> Newsgroups: borland.public.cppbuilder.database.ado,borland.public.delphi.database.ado References: <419b1586$1@newsgroups.borland.com> Subject: Re: ResultSet NOT supported ! Date: Wed, 17 Nov 2004 16:57:48 +0100 Lines: 112 Organization: TXT e-Solutions spa X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 213.215.153.30 Message-ID: <419b74fc@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1100707068 213.215.153.30 (17 Nov 2004 07:57:48 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail