Board index » delphi » Delphi Keeps Changing Cursor Type - WHY???? (Second Post)

Delphi Keeps Changing Cursor Type - WHY???? (Second Post)

Hello!

I have the simple query below in running against my SQL Server 2000 database
with Delphi 5

SELECT     tblFields.FieldName,
tblFields.FieldPrecision,tblDataTypes.TypeName
FROM         tblFields,tblDataTypes
WHERE     (tblFields.QueryID = 1) AND
(tblFields.FieldDataType=tblDataTypes.TypeID)

When I place this code into an ADODataset component with the server side
cursor which I want, Delphi keeps being really annoying and changing the
cursor type from ct KeySet to ctDynamic.  Although I can make the dataset
active in design time, I get the Data set does not support bookmarks because
the cursor type has been changed.  I don't have this problem on any of my
other queries!  Please help as it is really getting annoying!  I want a
clUseServer CursorLocation with a ctKeySet cursor type, I would have chosen
dynamic if I wanted it!!!

Cheers

Mike

 

Re:Delphi Keeps Changing Cursor Type - WHY???? (Second Post)


This is not well documented by Microsoft. The idea is
you cannot use any combination of Cursor Location
and Cursor Type. Using a Server Location you cannot
use controls that need bookmarks to position to different
records inside the recordset. When there is a contradiction
between Cursor Location and its Type the type is automatically
changed to accommodate. If you need bokkmarked recordsets,
then use Client Cursor with Static Type.

--

Doru

Quote
"Mike Evans" <mikeevans...@hotmail.com> wrote in message

news:3cf4130a_2@dnews...
Quote
> Hello!

> I have the simple query below in running against my SQL Server 2000
database
> with Delphi 5

> SELECT     tblFields.FieldName,
> tblFields.FieldPrecision,tblDataTypes.TypeName
> FROM         tblFields,tblDataTypes
> WHERE     (tblFields.QueryID = 1) AND
> (tblFields.FieldDataType=tblDataTypes.TypeID)

> When I place this code into an ADODataset component with the server side
> cursor which I want, Delphi keeps being really annoying and changing the
> cursor type from ct KeySet to ctDynamic.  Although I can make the dataset
> active in design time, I get the Data set does not support bookmarks
because
> the cursor type has been changed.  I don't have this problem on any of my
> other queries!  Please help as it is really getting annoying!  I want a
> clUseServer CursorLocation with a ctKeySet cursor type, I would have
chosen
> dynamic if I wanted it!!!

> Cheers

> Mike

Other Threads