Board index » delphi » recordcount supported?

recordcount supported?


2003-10-17 04:46:52 PM
delphi278
hi.
i want to use clUseServer and i need RecNo and RecordCount properties work
properly, for this purpose,
i am checking if ctStatic CursorType is supported, although RecNo and
RecordCount properties work properly
Support method returns false for those constants. i individually test the
constantst and find that only coResync is
not supported. what should i do to make sure that RecNo and RecordCount will
work properly. i am using
sql server 2000 with delphi 7(mdac 2.7).
thanks
aqAdhoc.Close;
aqAdhoc.SQL.Text := 'SELECT * FROM TheSimpleTable';
aqAdhoc.CursorLocation := clUseServer;
aqAdhoc.CursorType := ctStatic; // or ctKeyset;
aqAdhoc.LockType := ltUnspecified;
aqAdhoc.Open;
if not (aqAdhoc.Supports([coBookmark, coHoldRecords, coMovePrevious,
coResync])) then
showmessage('not working !');
 
 

Re:recordcount supported?

Sounds like you already know what you need to do (setting the cursor type,
cursor location, etc), so I am not sure what the problem is.
Just curious, since MS SQL doesn't support of concept of record numbers, how
are you using them?
This is worth a read..
bdn.borland.com/article/0,1410,28160,00.html
Good luck,
krf
"omer" <XXXX@XXXXX.COM>writes
Quote
hi.
i want to use clUseServer and i need RecNo and RecordCount properties work
properly, for this purpose,
i am checking if ctStatic CursorType is supported, although RecNo and
RecordCount properties work properly
Support method returns false for those constants. i individually test the
constantst and find that only coResync is
not supported. what should i do to make sure that RecNo and RecordCount
will
work properly. i am using
sql server 2000 with delphi 7(mdac 2.7).
thanks
 

Re:recordcount supported?

ok than i just want to know why not coResync is supported although i am
using static cursor.
is it an issue of sql server provider for ado ?
"Kevin Frevert" <XXXX@XXXXX.COM>writes
Quote
Sounds like you already know what you need to do (setting the cursor type,
cursor location, etc), so I am not sure what the problem is.
Just curious, since MS SQL doesn't support of concept of record numbers,
how
are you using them?

This is worth a read..
bdn.borland.com/article/0,1410,28160,00.html

Good luck,
krf

"omer" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>hi.
>i want to use clUseServer and i need RecNo and RecordCount properties
work
>properly, for this purpose,
>i am checking if ctStatic CursorType is supported, although RecNo and
>RecordCount properties work properly
>Support method returns false for those constants. i individually test
the
>constantst and find that only coResync is
>not supported. what should i do to make sure that RecNo and RecordCount
will
>work properly. i am using
>sql server 2000 with delphi 7(mdac 2.7).
>thanks


 

Re:recordcount supported?

I think that you should check for coApproxPosition. If this does not help,
try
ADODataSet1.Properties['IRowsetScroll'].Value - it should be true to support
RecordNo and RecordCount. Place this into try/except block - if this
property does not exists, RecordNo and RecordCount are not supported.
//----------------------
Regards,
Viatcheslav V. Vassiliev
www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"omer" <XXXX@XXXXX.COM>сообщи?сообщила ?новостях следующе?
Quote
ok than i just want to know why not coResync is supported although i am
using static cursor.
is it an issue of sql server provider for ado ?

"Kevin Frevert" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>Sounds like you already know what you need to do (setting the cursor
type,
>cursor location, etc), so I am not sure what the problem is.
>Just curious, since MS SQL doesn't support of concept of record numbers,
how
>are you using them?
>
>This is worth a read..
>bdn.borland.com/article/0,1410,28160,00.html
>
>Good luck,
>krf
>
>"omer" <XXXX@XXXXX.COM>writes
>news:XXXX@XXXXX.COM...
>>hi.
>>i want to use clUseServer and i need RecNo and RecordCount properties
work
>>properly, for this purpose,
>>i am checking if ctStatic CursorType is supported, although RecNo and
>>RecordCount properties work properly
>>Support method returns false for those constants. i individually test
the
>>constantst and find that only coResync is
>>not supported. what should i do to make sure that RecNo and
RecordCount
>will
>>work properly. i am using
>>sql server 2000 with delphi 7(mdac 2.7).
>>thanks
>
>


 

Re:recordcount supported?

yes i tried them but still wondering why Resync does not seem to be
supported
although i am not using readonly locking for the dataset.
thanks
"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
Quote
I think that you should check for coApproxPosition. If this does not help,
try

ADODataSet1.Properties['IRowsetScroll'].Value - it should be true to
support
RecordNo and RecordCount. Place this into try/except block - if this
property does not exists, RecordNo and RecordCount are not supported.
 

Re:recordcount supported?

adResync - Supports the Resync method to update the cursor with the data
that is visible in the underlying database.
This value is meaningfull only with client-side cursor with stores data in
in-memory cache. Server-side cursor always has access to data in DBMS.
//----------------------
Regards,
Viatcheslav V. Vassiliev
www.oledbdirect.com
The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"omer" <XXXX@XXXXX.COM>сообщи?сообщила ?новостях следующе?
Quote
yes i tried them but still wondering why Resync does not seem to be
supported
although i am not using readonly locking for the dataset.
thanks
"Viatcheslav V. Vassiliev" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>I think that you should check for coApproxPosition. If this does not
help,
>try
>
>ADODataSet1.Properties['IRowsetScroll'].Value - it should be true to
support
>RecordNo and RecordCount. Place this into try/except block - if this
>property does not exists, RecordNo and RecordCount are not supported.