Proyecto MTF (MySQL to Firebird)
#61
Escrito 05 diciembre 2008 - 04:28
#62
Escrito 05 diciembre 2008 - 08:59
Archivos adjuntos
#63
Escrito 06 diciembre 2008 - 08:25
#64
Escrito 06 diciembre 2008 - 09:24
... bueno, una tarea menos... ahora falta que termines el programa¡Hombre!, Mejor de ahí se daña , ¡Excelente!
#65
Escrito 06 diciembre 2008 - 07:46
Saludos.
#66
Escrito 09 diciembre 2008 - 06:32
case cdTablas1.Fields[j].DataType of ftString, ftWideString: begin CampoPaso := cdTablas1.Fields[j].AsString; CampoPaso := StringReplace(CampoPaso,'''','´',[rfReplaceAll]); ValoresSQL := ValoresSQL+#39+CampoPaso+#39; end; ftMemo,ftBlob, ftTypedBinary, ftGraphic : begin ValoresSQL := ValoresSQL+' NULL'; //ValoresSQL := ValoresSQL+' :BLOB'+inttostr(i); CampoBlob := True; end; ftDate, ftTime, ftDateTime, ftTimeStamp : begin //AQUI EL PROBLEMA if (cdTablas1.Fields[j].AsDateTime = NULL) or (cdTablas1.Fields[j].AsDateTime = 1899-12-30) then ValoresSQL := ValoresSQL+' NULL' else ValoresSQL := ValoresSQL+#39+DateToStr(cdTablas1.Fields[j].AsDateTime)+#39; ValoresSQL := StringReplace(ValoresSQL,'/','.',[rfReplaceAll]); end; ftInteger, ftSmallint : begin if cdTablas1.Fields[j].AsString = '' then ValoresSQL := ValoresSQL+'0' else ValoresSQL := ValoresSQL+cdTablas1.Fields[j].AsString; end; ftFloat, ftCurrency : begin if cdTablas1.Fields[j].AsString = '' then ValoresSQL := ValoresSQL+'0.00' else ValoresSQL := ValoresSQL+cdTablas1.Fields[j].AsString; end; ftBoolean : begin if cdTablas1.Fields[j].Value = True then ValoresSQL := ValoresSQL+'1' else ValoresSQL := ValoresSQL+'0'; end; else begin ValoresSQL := ValoresSQL+cdTablas1.Fields[j].AsString; end;
y este es el error que me tira:
---------------------------
Debugger Exception Notification
---------------------------
Project MTF.exe raised exception class EIBInterBaseError with message 'conversion error from string "1899-12-30"'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
Una manita por favor.
Saludos.
#67
Escrito 09 diciembre 2008 - 06:37
ftDate, ftTime, ftDateTime, ftTimeStamp : begin if DateToStr(cdTablas1.Fields[j].AsDateTime) = '' then ValoresSQL := ValoresSQL+' NULL' else ValoresSQL := ValoresSQL+#39+cdTablas1.Fields[j].AsString+#39; ValoresSQL := StringReplace(ValoresSQL,'/','.',[rfReplaceAll]); end;
¿Resultado?:
---------------------------
Debugger Exception Notification
---------------------------
Project MTF.exe raised exception class EIBInterBaseError with message 'conversion error from string ""'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
Saludos.
#68
Escrito 10 diciembre 2008 - 07:14
ftDate, ftTime, ftDateTime, ftTimeStamp : begin if DateToStr(cdTablas1.Fields[j].AsDateTime) = '' then ValoresSQL := ValoresSQL+' NULL' else ValoresSQL := ValoresSQL+#39+FormatDateTime('mm/dd/yyyy', cdTablas1.Fields[j].AsDate)+#39; ValoresSQL := StringReplace(ValoresSQL,'/','.',[rfReplaceAll]); end;
#69
Escrito 10 diciembre 2008 - 07:41
Saludos.
#70
Escrito 11 diciembre 2008 - 04:01
---------------------------
Debugger Exception Notification
---------------------------
Project MTF.exe raised exception class EIBInterBaseError with message 'conversion error from string "12/30/1899"'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
Voy a separar los campos de tipo time a ver si el problema proviene de ahí.
Saludos.
#71
Escrito 11 diciembre 2008 - 04:07
Hola Eduardo, con tu modificación me da este error:
---------------------------
Debugger Exception Notification
---------------------------
Project MTF.exe raised exception class EIBInterBaseError with message 'conversion error from string "12/30/1899"'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
Voy a separar los campos de tipo time a ver si el problema proviene de ahí.
Saludos.
Que tipo de campo es, Date, Time o DateTime ???
Por otro lado, parece que Firebird solo acepta este formato de fecha 11.12.2008 no se si es pase con MySQL.
Salud OS
#72
Escrito 11 diciembre 2008 - 04:11
Saludos.
#73
Escrito 11 diciembre 2008 - 04:18
Los campos son Date y Time, ¿A qué te refieres con que sólo acepta formato "11.12.2008"?, ¿que se separan por puntos?.
Saludos.
En mis programas con firebird ese es el formato que uso porque creo recordar que me enviaba un error en la fecha si usaba "/" de separador.
Salud OS
#74
Escrito 11 diciembre 2008 - 06:08
---------------------------
Debugger Exception Notification
---------------------------
Project MTF.exe raised exception class EIBInterBaseError with message 'Dynamic SQL Error
SQL error code = -206
Column unknown
NO1
At line 1, column 23'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
No entiendo el error, el campo NO1 sí existe pero me dice que no.
Saludos.
#75
Escrito 12 diciembre 2008 - 07:02
con respecto a ese error seria bueno que dijeras que instruccion exactamente esta ejecutando cuando sucede, porque de lo contrario seria tratar de adivinar.
#76
Escrito 12 diciembre 2008 - 07:14
Saludos.
PD: Llegué a poner un showmessage para ver las SENTENCIAS y hasta ahora está correctamente.
#77
Escrito 12 diciembre 2008 - 07:31
#78
Escrito 12 diciembre 2008 - 07:50
tabla1
tabla2 -> tiene el campo NO1 y se graba Bien
tabla3 -> tiene el campo NO1 y se graba bien
tabla4 -> se graban los datos
tabla5 -> deja de grabar
...
tabla38
Saludos.
#79
Escrito 12 diciembre 2008 - 08:23
#80
Escrito 12 diciembre 2008 - 08:33
NO1 = N01??? has verificado eso?
Pues no lo he revisado, aunque dudo que se así, más tarde te comento ya que no lo tengo aquí.
Saludos.