Error de DW(PASO 1)
Publicado por Manuel Ruiz (33 intervenciones) el 13/12/2002 13:30:32
Estoy trabajando con Oracle y tengo el el siguiente problema, lo he dividio en dos mensajes, PASO 1, PASO 2:
Este es mi código
If dw_datacont.Update() <> 1 then
Messagebox("ADCO","No se pudo registrar el Contrato en el sistema",StopSign!)
Rollback;
return
else
dw_datacartfianza.object.cod_contrato[dw_datacartfianza.GetRow()]=dw_datacont.object.cod_contrato[dw_datacont.GetRow()]
If dw_datacartfianza.Update() <> 1 then
Messagebox("Administración de Contratos","No se pudo guardar el Contrato en el sistema.",StopSign!) Rollback;
return
else
Messagebox("ADCO","Se registró el Contrato en el sistema.")
commit;
end if
end if
Paso 1:
Cuando Ingreso tanto el COD_CONTRATO(11111) y el NUM_CF(11111) repetidos...estos ya existen en la BD(el COD_CONTRATO y el NUM_CF son la pk de las Tablas contratos y carta fianza respectivamente ) Acá me da el sgte. error, el cual esta bien, hasta acá todo OK.
ORA-00001: unique constraint (ADCO.SYS_C003084) violated
No changes made to database.
INSERT INTO "AC_CONTRATO" ( "COD_CONTRATO", "FECHA_CONTR", "VENC_CONTR", "RUC_ET" ) VALUES ( :1, :2, :3, :4 )
Continue en el siguiente mensaje--->
Este es mi código
If dw_datacont.Update() <> 1 then
Messagebox("ADCO","No se pudo registrar el Contrato en el sistema",StopSign!)
Rollback;
return
else
dw_datacartfianza.object.cod_contrato[dw_datacartfianza.GetRow()]=dw_datacont.object.cod_contrato[dw_datacont.GetRow()]
If dw_datacartfianza.Update() <> 1 then
Messagebox("Administración de Contratos","No se pudo guardar el Contrato en el sistema.",StopSign!) Rollback;
return
else
Messagebox("ADCO","Se registró el Contrato en el sistema.")
commit;
end if
end if
Paso 1:
Cuando Ingreso tanto el COD_CONTRATO(11111) y el NUM_CF(11111) repetidos...estos ya existen en la BD(el COD_CONTRATO y el NUM_CF son la pk de las Tablas contratos y carta fianza respectivamente ) Acá me da el sgte. error, el cual esta bien, hasta acá todo OK.
ORA-00001: unique constraint (ADCO.SYS_C003084) violated
No changes made to database.
INSERT INTO "AC_CONTRATO" ( "COD_CONTRATO", "FECHA_CONTR", "VENC_CONTR", "RUC_ET" ) VALUES ( :1, :2, :3, :4 )
Continue en el siguiente mensaje--->
Valora esta pregunta


0