Article View: borland.public.cppbuilder.database.ado
Article #2863Re: recordset populating problem
From: Tom Jowitt
Date: Wed, 12 Mar 2003 12:09
Date: Wed, 12 Mar 2003 12:09
52 lines
2785 bytes
2785 bytes
thanks but i am not using ADOExpress as i have BCB5 Pro edition and
hence cannot use ADOExpress without a significant upgrade.
the add-on i use uses TADORecordset
i got it working by changing the cursor type like you said. thanks!
Viatcheslav V. Vassiliev wrote:
> 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:
<3e6f2390@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3e6f0910$1@newsgroups.borland.com> <3e6f1cd1$2@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 04:39:51 PST Date: Wed, 12 Mar 2003 12:09:19 +0000 From: Tom Jowitt <tomjowitt@hotmail.com> User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: recordset populating problem References: <3e6f0910$1@newsgroups.borland.com> <3e6f1cd1$2@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 62.30.132.201 Message-ID: <3e6f2390@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047470992 62.30.132.201 (12 Mar 2003 04:09:52 -0800) Lines: 53 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail