Subject | Field Size mismatch error |
---|---|
Author | mcrosman1957 |
Post date | 2002-10-08T20:04Z |
Hi,
I am using Delphi 6 Ent. and Firebird 1.0.0.338.
I have created a table PLANCONORC as:
CREATE TABLE PlanConOrc
(
NumReg SMALLINT NOT NULL,
Nivel VARCHAR(8) NOT NULL, <==Problem with this field
Code VARCHAR(7) NOT NULL UNIQUE,
Conta VARCHAR(40) NOT NULL,
Tipo VARCHAR(2),
PRIMARY KEY (NumReg)
);
I am using a datamodule with:
1 ClientDataset
1 DatasetProvider
1 IBQuery
1 IBTransaction
1 IBDatabase
When I open the Collection Editor of the ClientDataset and Add All
Fields there is a problem with the Nivel (TStringField) field.
Nivel field is a VARCHAR(8) type and not a Char type.
In the Collection Editor when I select the Nivel field the following
properties are shown as:
FixedChar = True (This specifies that Nivel field is a Char Type and
Not a VARCHAR type)
Size = 1 (NOT 8)
The other varchar fields of the table PLANCONORC: Code, Conta, Tipo
are fine.
Why is it hapenning with the Nivel field?
When I try to assign a 8 character string to Nivel the folowing error
occurs: Field size mismatch.
Could anyone help me solve this problem?
Thank you all.
Marcelo.
I am using Delphi 6 Ent. and Firebird 1.0.0.338.
I have created a table PLANCONORC as:
CREATE TABLE PlanConOrc
(
NumReg SMALLINT NOT NULL,
Nivel VARCHAR(8) NOT NULL, <==Problem with this field
Code VARCHAR(7) NOT NULL UNIQUE,
Conta VARCHAR(40) NOT NULL,
Tipo VARCHAR(2),
PRIMARY KEY (NumReg)
);
I am using a datamodule with:
1 ClientDataset
1 DatasetProvider
1 IBQuery
1 IBTransaction
1 IBDatabase
When I open the Collection Editor of the ClientDataset and Add All
Fields there is a problem with the Nivel (TStringField) field.
Nivel field is a VARCHAR(8) type and not a Char type.
In the Collection Editor when I select the Nivel field the following
properties are shown as:
FixedChar = True (This specifies that Nivel field is a Char Type and
Not a VARCHAR type)
Size = 1 (NOT 8)
The other varchar fields of the table PLANCONORC: Code, Conta, Tipo
are fine.
Why is it hapenning with the Nivel field?
When I try to assign a 8 character string to Nivel the folowing error
occurs: Field size mismatch.
Could anyone help me solve this problem?
Thank you all.
Marcelo.