pcerdaz
2007-07-15 16:04:39 UTC
Hello,
I have a problem with a simple SLQ command on C++Builder 2006 because it
does not recognize the field where I need some information. I'm using the
following code in the IBConsole with correct answer of CantidadUsuarios = 1:
select count(*) as CantidadUsuarios from USUARIOS where
USUARIOS.CodigoUsuario = 21
But in the C++Builder where I used the following code, I have an error
message that says "Project nnn raised an exception class EDatabaseError with
message 'IBDS_Usuarios: Field 'CODIGOUSUARIO' not found'":
Sentencia_SQL = "select count(*) as CantidadUsuarios from USUARIOS where
USUARIOS.CodigoUsuario = ";
Sentencia_SQL += String(Valor);
DMTEC->IBDS_Usuarios->SelectSQL->Text = Sentencia_SQL;
DMTEC->IBDS_Usuarios->Active = true;
What could be wrong? Any idea would be gratefully.
pcerdaz
I have a problem with a simple SLQ command on C++Builder 2006 because it
does not recognize the field where I need some information. I'm using the
following code in the IBConsole with correct answer of CantidadUsuarios = 1:
select count(*) as CantidadUsuarios from USUARIOS where
USUARIOS.CodigoUsuario = 21
But in the C++Builder where I used the following code, I have an error
message that says "Project nnn raised an exception class EDatabaseError with
message 'IBDS_Usuarios: Field 'CODIGOUSUARIO' not found'":
Sentencia_SQL = "select count(*) as CantidadUsuarios from USUARIOS where
USUARIOS.CodigoUsuario = ";
Sentencia_SQL += String(Valor);
DMTEC->IBDS_Usuarios->SelectSQL->Text = Sentencia_SQL;
DMTEC->IBDS_Usuarios->Active = true;
What could be wrong? Any idea would be gratefully.
pcerdaz