Overflow error deleting a record
Posted: 14.03.2009, 21:24
Hi,
Using Delphi7-MySQL 5 ... I have this:
CREATE TABLE `banco` (
`banco_id` bigint(20) NOT NULL auto_increment,
`ban_numero` smallint(6) NOT NULL,
`ban_nombre` varchar(80) NOT NULL,
PRIMARY KEY (`banco_id`),
UNIQUE KEY `ban_unq_numero` (`ban_numero`),
UNIQUE KEY `ban_unq_nombre` (`ban_nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=689349199046620195 DEFAULT CHARSET=latin1;
I have a ZQuery component connected to a DataSetProvider and then a ClientDataSet
When deleting a record I get:
"Overflow while converting variant of type (Int64) into type (Integer)"
The code I used to delete the record is:
DataSource.DataSet.Delete;
if TClientDataSet( DataSource.DataSet ).ApplyUpdates(0) > 0 then
TClientDataSet( DataSource.DataSet ).CancelUpdates;
On a previous version of the program, I connected the DataSource directly to the TZQuery and I didn't have this problem. I added Provider and ClientDataSet since I need functioanlity of these...
I suppose this problem is related to the PK field "banco_id", being bigInt? what internally would be treating it as Integer data type?
Thank you,
Using Delphi7-MySQL 5 ... I have this:
CREATE TABLE `banco` (
`banco_id` bigint(20) NOT NULL auto_increment,
`ban_numero` smallint(6) NOT NULL,
`ban_nombre` varchar(80) NOT NULL,
PRIMARY KEY (`banco_id`),
UNIQUE KEY `ban_unq_numero` (`ban_numero`),
UNIQUE KEY `ban_unq_nombre` (`ban_nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=689349199046620195 DEFAULT CHARSET=latin1;
I have a ZQuery component connected to a DataSetProvider and then a ClientDataSet
When deleting a record I get:
"Overflow while converting variant of type (Int64) into type (Integer)"
The code I used to delete the record is:
DataSource.DataSet.Delete;
if TClientDataSet( DataSource.DataSet ).ApplyUpdates(0) > 0 then
TClientDataSet( DataSource.DataSet ).CancelUpdates;
On a previous version of the program, I connected the DataSource directly to the TZQuery and I didn't have this problem. I added Provider and ClientDataSet since I need functioanlity of these...
I suppose this problem is related to the PK field "banco_id", being bigInt? what internally would be treating it as Integer data type?
Thank you,