Hola a todos:
Tengo el siguiente código de SQL en un Tquery:
Código Delphi
[-]
With Qry_DatosDoc do
Begin
Close;
SQL.Clear;
SQL.Add('SELECT Doc_Fecha_Ingreso,');
SQL.Add('Doc_Porcen_Descuento,');
SQL.Add('Doc_Total_Descuento,');
SQL.Add('Doc_Total,');
SQL.Add('Vend_Numero,');
SQL.Add('Flag_Cambio ');
SQL.Add('FROM PREVENTA ');
SQL.Add('Where Nro_Atencion = :Nro_Atencion');
ParamByName('Nro_Atencion').AsInteger :=
StrtoInt(vNro_Atencion.text);
Active := True;
ShowMessage(IntToStr(Qry_DatosDoc.FieldCount));
ShowMessage(IntToStr(Qry_DatosDoc.ParamByName('Vend_Numero').AsInteger));
Pero me dice que no existe el parametro Vend_numero, pero sin embargo esa consulta la estoy mostrando también en un DbGrid y aparecen los datos y además la columna se llama de ese modo.
Espero sus ayudas amigos, gracias
Hasta Luego -