Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Database/Drivers/InterBase    [ Add a report in this area ]  
Report #:  44528   Status: Closed
dbExpress can't support the AutoInc Field with Interbase2007
Project:  Delphi Build #:  11.0.2627.5503
Version:    11.0 Submitted By:   Luke Fan
Report Type:  Crash / Data loss / Total failure Date Reported:  4/17/2007 12:24:23 AM
Severity:    Critical / Show Stopper Last Updated: 10/31/2008 12:37:35 AM
Platform:    All versions Internal Tracking #:  
Resolution: Test Case Error (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
I used Interbase2007 developer edition and delphi2007 for win32.

I tried to make a applyupdate a clientdataset that connect to a datasetprovider, sqldataset and sqlconnection. This table has an AutoInc Primary Key Field. And it can't run and except a memory address error.

I tried to do same thing with MS SQLServer2005 express version, it can be run.

The error message:
Project Project1.exe raised exception class EAccessViolation with message 'Access violation address 4056C37D in module 'gds32.dll''. Read of address 014E0000'.
Steps to Reproduce:
add components, SQLConnection, SQLDataSet, DataSetProvider, ClientDataSet, DBGrid, Button
set SQLConnection to connect with interbase2007
set SQLDataSet open the table that have an autoinc field.
set SQLDataSet.Fields[0].Request to Flase;
set datasetprovider.DataSet to SQLDataSet.
set ClientDataSet.ProviderName to DataSetProvider
set the datasource and dbgrid to connect with clientdataset
the button.onclick event code is ClientDataSet.ApplyUpdate(0);

I append a record and click the button then the error message is shown.
Workarounds
None
Attachment
None
Comments

Tomohiro Takahashi at 10/31/2008 12:37:14 AM -
From Tomohiro:
-----------------
Are you using Sequence generator and Trigger to implement auto-increment field?
Could you try to change 'Required' property of TIntegerField from 'True' to 'False'.
I added TIntegerField for both TSQLTable and TClientDataSet.
------------------

From Luke:
------------------
Hi Takahashi-san,

Thank you very much.
I think the reason is my environment has some problem. Now, it's right.

Luke
------------------

Server Response from: ETNACODE01