Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
Quality Central
Delphi-BCB
Midas
Install
Java Midas
Socket Server
TClientDataSet
TDataSetProvider
TDCOMConnection
TMidasConnection
TOLEEnterpriseConnection
TProvider
TRemoteServer
TSimpleObjectBroker
TSocketConnection
TWebConnection
WebMidas
XML Midas
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Midas/TClientDataSet
[ Add a report in this area ]
Report #:
1050
Status:
Closed
key bigint fields doesn't work
Project:
Delphi
Build #:
6.240
Version:
6.0
Submitted By:
Igor Proshkin
Report Type:
Basic functionality failure
Date Reported:
4/26/2002 10:30:01 AM
Severity:
Commonly encountered problem
Last Updated:
2/9/2004 8:14:32 AM
Platform:
95, 98, 2000, NT, XP
Internal Tracking #:
Resolution:
As Designed
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
(10 Total Ratings)
3.60 out of 5
Total Votes:
None
Description
I have a problem using bigint fields with ClientDataSet:
This is the sequence of my actions:
Create table in MS SQL which has just one field 'ID' type 'bigint' and save
it as Table1
In Delphi:
1. Create New Application.
2. Put ADOConnection, ADODataSet, DataSetProvider, ClientDataSet, DataSource
and DataGrid
3. Connect them all.
4. Setup the ADOConnection.ConnectionString (I use Microsoft OLE DB Provider
for SQL Server)
5. Set ADODataSet.CommandText to 'Select * From Table1'
6. Create persistent field for ADODataSet ADODataSetID and set
ProviderFlag.pfInKey to True.
7. Set ClientDataSet.Active to True
8. Run the project.
9. Add record with ID equal 1
10. Try to add one more record with ID equal 2 - got 'Key Violation' error.
If I change the field type to int - everything works fine.
If I don't set the pfInKey provider flag to True again everything works
fine.
Is where any way to walk this problem around or is there any hotfix
available?
I use MS SQL 2000 and Delphi 6 Enterprise Service pack 2.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments
Steven Kamradt at 10/9/2002 6:44:50 AM
-
I am also experiencing this problem with Delphi 7 Enterprise. It does not appear that it is limited to only key fields, or limited to a specific provder but a problem with any ftLargeInt fields in the tClientDataset.
The following test fails to operate properly:
I have created a small test application consisting of a tDBGrid, a
TClientDataset, a tDatasource. Connect all as normal. Assign two
fields to the tClientDataset fielddefs, the first should be a ftLargeInt
and the second a ftInteger.
Copy the routine SortCustomClientDataSet from the article
http://community.borland.com/article/0,1410,29056,00.html and wire the
OnTitleClick to the following:
procedure TForm1.DBGrid1TitleClick(Column: TColumn);
begin
SortCustomClientDataSet(ClientDataSet1, Column.FieldName);
end;
Run the application and enter the following data into each field:
300 300
100 100
5 5
999 999
800 800
1 1
200 200
Then click on the columns. The ftInteger fields sort properly and the
ftLargeInts do not.
Dave Rowntree at 10/9/2002 8:37:07 AM
-
Please would you create a new report for the problem you describe in your comment. It may well be related to this problem but the test case is different. If you would provide a zipped up test app that demonstrates the problem and describe in steps how to use it to show the problem, that would be useful.
Thanks.
Steven Kamradt at 10/9/2002 9:45:18 AM
-
see Probem 2626 with test application.
Dave Rowntree at 5/3/2003 3:40:05 AM
-
In Attachments, please supply a simple, zipped up, compilable test case app.
In Steps, please decribe how to use the test case app to demonstrate the problem.
In Description, please describe the problem you are seeing.
Thank you.
Dave Rowntree at 2/9/2004 8:14:27 AM
-
View Your Reports
Search
Server Response from: CODE1
Developer Tools
Blackfish SQL
C++Builder
Delphi
Delphi for PHP
Delphi Prism
InterBase
JBuilder
J Optimizer
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Chats
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us