Ver Mensaje Individual
  #2  
Antiguo 27-10-2005
pigu pigu is offline
Miembro
 
Registrado: jul 2004
Posts: 12
Reputación: 0
pigu Va por buen camino
El problema persiste en delphi 6 ya sea porque tiene un bug dbExpress o por otro motivo que no se cual sera.
Lo he probado en delphi 7 y anda, lo he probado en Delphi 2005 y anda....
Cosas de la programacion, no???
Gracias igual a los que leyeron este hilo.
El driver con que trabajo es de Core Lab para dbExpress.
Lo unico que cambie es la parte del seteo con sqlserver
Código:
procedure TForm1.ejecturar;
begin
  try
	Screen.Cursor := crHourGlass;
	case RadioGroup1.ItemIndex of
	  0:
		begin
		  with Interbase do
		  begin
			Close;
			Prepared := False;
			Prepared := True;
			ParamByName('id_empresa').AsString := '01';
			ParamByName('fecha1').AsDate := cxDateEdit1.Date;
			ParamByName('fecha2').AsDate := cxDateEdit2.Date;
			ParamByName('nro_base').AsInteger := 0;
			ParamByName('id_moneda').Value := null;
			if ParamByName('id_moneda').IsNull then
			begin
			  ParamByName('id_moneda').DataType := ftInteger;
			  ParamByName('id_moneda').Bound := True;
			  ParamByName('id_moneda').Clear;
			end;
		  end;
		end;
	  1:
		begin
		  with Mssql do
		  begin
			Close;
			Params.Clear;
			CommandText := '';
			CommandType := ctStoredProc;
			CommandText := 'L_ASIENTOS_D';
			if Prepared then
			  Prepared := False;
			Prepared := True;
			ParamByName('id_empresa').AsString := '01';
			ParamByName('fecha1').AsSQLTimeStamp := DateTimeToSQLTimeStamp(cxDateEdit1.Date);
			ParamByName('fecha2').AsSQLTimeStamp := DateTimeToSQLTimeStamp(cxDateEdit2.Date);
			ParamByName('nro_base').AsInteger := 0;
			ParamByName('id_moneda').Value := null;
		  end;
		end;
	end;
  ClientDataSet.Open;
  finally
	Screen.Cursor := crDefault;
  end;
Responder Con Cita