Clientdataset have a problem with SQL Server data type Bigint ?
From: Marius Oloeru (moloeru_at_totalsoft.ro)
Date: 11/27/03
- Next message: Marcio Barroso: "Strange error "Connection failure" happens from time to time in my web application"
- Previous message: Hans van Leth: "Re: Multiple commands using tADOCommand"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Marcio Barroso: "Strange error "Connection failure" happens from time to time in my web application"
- Previous message: Hans van Leth: "Re: Multiple commands using tADOCommand"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|