microbiano
20-08-2011, 00:05:06
bien tengo el siguiente codigo:
with Modulo.Qry_Temp2 do
begin
sql.Clear;
SQL.Add('insert into agenda(Ejercicio,Status,Procedimiento,descripcion,unidadcompradora,DePreconvocatoria)');
SQL.Add('values(:PEjercicio,:PStatus,:PProcedimiento,:PDescripcion,:Punidadcompradora,:Pdepreconvoca toria)');
Parameters.ParamByName('PEjercicio').Value:=Trim(Self.txtejercicio.Text);
Parameters.ParamByName('PStatus').Value:=Self.cbb1.Text;
Parameters.ParamByName('PProcedimiento').Value:=Trim(self.txtevento.Text);
Parameters.ParamByName('PDescripcion').Value:=Trim(Self.txtnotas.Text);
Parameters.ParamByName('Punidadcompradora').Value:=Trim(self.txtunidad.Text);
Parameters.ParamByName('Pdepreconvocatoria').value:=self.dtpFechaPreIni.Date;
try
ExecSQL;
Application.MessageBox('Registro Almacenado con Éxito','Error', MB_OK + MB_ICONINFORMATION);
except
on E:EOleException do
begin
MessageDlg(Format('Error: %s Codigo: %d', [E.Message, E.ErrorCode]), mtError, [mbOK], 0);
end;
end
end;
y si lo ejecuto me muestra el siguiente error:
caracteristica opcional no implementada:
alguien sabe por que el error?
si quito el campo DePreconvocatoria, el parametro :Pdepreconvocatoria y el valor del parametro Parameters.ParamByName('Pdepreconvocatoria').value:=self.dtpFechaPreIni.Date;
funciona a la perfeccion.
el campo que quiero insertar es una fecha que esta en un componente TdatetimePicker
la base de datos es sqlserver2000 y el tipo de campo es datetime
with Modulo.Qry_Temp2 do
begin
sql.Clear;
SQL.Add('insert into agenda(Ejercicio,Status,Procedimiento,descripcion,unidadcompradora,DePreconvocatoria)');
SQL.Add('values(:PEjercicio,:PStatus,:PProcedimiento,:PDescripcion,:Punidadcompradora,:Pdepreconvoca toria)');
Parameters.ParamByName('PEjercicio').Value:=Trim(Self.txtejercicio.Text);
Parameters.ParamByName('PStatus').Value:=Self.cbb1.Text;
Parameters.ParamByName('PProcedimiento').Value:=Trim(self.txtevento.Text);
Parameters.ParamByName('PDescripcion').Value:=Trim(Self.txtnotas.Text);
Parameters.ParamByName('Punidadcompradora').Value:=Trim(self.txtunidad.Text);
Parameters.ParamByName('Pdepreconvocatoria').value:=self.dtpFechaPreIni.Date;
try
ExecSQL;
Application.MessageBox('Registro Almacenado con Éxito','Error', MB_OK + MB_ICONINFORMATION);
except
on E:EOleException do
begin
MessageDlg(Format('Error: %s Codigo: %d', [E.Message, E.ErrorCode]), mtError, [mbOK], 0);
end;
end
end;
y si lo ejecuto me muestra el siguiente error:
caracteristica opcional no implementada:
alguien sabe por que el error?
si quito el campo DePreconvocatoria, el parametro :Pdepreconvocatoria y el valor del parametro Parameters.ParamByName('Pdepreconvocatoria').value:=self.dtpFechaPreIni.Date;
funciona a la perfeccion.
el campo que quiero insertar es una fecha que esta en un componente TdatetimePicker
la base de datos es sqlserver2000 y el tipo de campo es datetime