Clientdataset have a problem with SQL Server data type Bigint ?

From: Marius Oloeru (moloeru_at_totalsoft.ro)
Date: 11/27/03


Date: 27 Nov 2003 03:26:41 -0700

Hello,

Here is my problem :

I'm trying to use a Clientdataset with an TAdoQuery / TAdostoredProc through a Datasetprovider. Adoquery / adostoredproc make a simple selection from one table on a database (SQL Server 2000). The table has primary key of type Bigint.
Now, if I put a DBlookupcombobox on a form in Delphi, set the ListSource to a datasource, which datasource.dataset is selected to clientdataset, select KeyField to the name of primary key of the table, and then select ListField to any field, then run the application (of course, open clientdataset) I have been seen that dblookupcombobox is displaying nothing. But, I got an eroror : "Constant is not correct type %d", where, I observed that %d is always the key field selected in dblookupcombobox.

I know, you will say that i have make a mistake. Possible...

Now, I modified the type of primary key from type Bigint to int
and i've run again the application (of course, updating persistent fields from clientdataset).
Surprise : worked.

Ok, make the type of primary key back to bigint and begin to debug the application.

Using CallStack, the "error" is somehow located in DBCommon.pas,
class TFilterExpr and method PutConstant.
Well, if you look at the PutConstant function, you will see that
the fieds which have data type of Largeint( = bigint from sql)
are efectivelly ignored. Instead of using ftLargeInt in that function, an error is raised and good bye !

My question is : did someone has the same problem when working
with TClientDataset and Bigint fields from Sql ?
And if the answer is yes, how can i solve this problem ?

Regards and thank's in advance,
Marius.



Relevant Pages

  • Problem reciving xml element
    ... CONSTRAINT Soknadsskjemaer_pk PRIMARY KEY ) ... ID bigint IDENTITYNOT NULL, ... CREATE TABLE Checklister ...
    (microsoft.public.sqlserver.xml)
  • Change data type int to Bigint
    ... Primary key on products table is type BigInt, foriegn key on Fact table is ... type Int. ... will have multiple servers generating product IDS, ...
    (microsoft.public.sqlserver.programming)
  • Re: Generate Random Primary Key
    ... column by making it a BIGINT or NUMERIC. ... If the column has a Primary Key ... David Portas ... SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Identity column: what happens when it runs out?
    ... I have a table containing an identity column (bigint) as its primary key. ... The table will have very frequent insertions/deletions from it. ...
    (microsoft.public.sqlserver.programming)
  • Re: Linking SQL Server 2000 to Access - Bigint datatype
    ... Access knows about BIGINT? ... SQL Server MVP ... > bigint to an int, ...
    (microsoft.public.access.externaldata)