🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: recordset populating problem

#2862
From: Viatcheslav V. Vassiliev
Date: Wed, 12 Mar 2003 11:34
40 lines
2405 bytes
It is normal if you are with server-side cursor. If OLEDB provider can not
return affected rows quickly, it can return -1. Recordset (there is not
TADORecordset object in ADO Express) is returned by TADOCommand.Execute
method.

This is a sample from help:

with ADOCommand1 do begin
  CommandText := 'SELECT Company, State ' +
    'FROM customer ' +
    'WHERE State = :StateParam';
  CommandType := cmdText;
  Parameters.ParamByName('StateParam').Value := 'HI';
  ADODataSet1.Recordset := Execute;
end;

----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.

"Tom Jowitt" <tomjowitt@hotmail.com> ???????/???????? ? ???????? ?????????:
news:3e6f0910$1@newsgroups.borland.com...
> i have problems using the TADORecordset function. i can use commands to
> execute SQL but can use the Recordsets. everytime i populate a recordset
> it brings back the recordcount as -1. this is how i execute the SQL:
>
> ADOCommand1->Close();
> ADOCommand1->CommandText = "SELECT Wellname FROM Wells";
> ADOCommand1->Active=true;
> ADOCommand1->Open();
>
> ADOCommand1->Execute(RecordsAffected, EmptyParam, adCmdText);
>
> how do i return a recordset from this command?
>
> cheers in advance
>
Technical Details
Message-ID: <3e6f1cd1$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3e6f0910$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,7058e89c5142fa3b
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-03-12 03:51:00 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3e6f0910$1@newsgroups.borland.com>
Subject: Re: recordset populating problem
Date: Wed, 12 Mar 2003 14:34:50 +0300
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.247.201.57
Message-ID: <3e6f1cd1$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1047469265 213.247.201.57 (12 Mar 2003 03:41:05 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail