[Lazarus] Problem working with Params in TSQLQuery

Michael Van Canneyt michael at freepascal.org
Tue Aug 19 14:28:30 CEST 2008



On Tue, 19 Aug 2008, Eduardo Lopez wrote:

> I'm sorry. The table has a basic structure:

CREATE TABLE USUARIOS
(
 CODUSU Char(12) NOT NULL,
 APENOMB Char(40) NOT NULL,
 PASSWOR Char(12) NOT NULL,
 CONSTRAINT PK_USUARIOS PRIMARY KEY (CODUSU)
);

Aha. 
This is probably your problem. Try extending the parameter value 
so it has the declared length by padding it with spaces.


The other way is to declare the table as
CREATE TABLE USUARIOS
(
 CODUSU VARChar(12) NOT NULL,
 APENOMB VarChar(40) NOT NULL,
 PASSWOR VarChar(12) NOT NULL,
 CONSTRAINT PK_USUARIOS PRIMARY KEY (CODUSU)
);

Could you try this ?

Michael.



More information about the Lazarus mailing list