estube viendo esto del los isolations level pere no se cual es el mas recomendable y si lo estoy utilizando bien:
Código Delphi
[-]
Q_linfact.SQL.Text:='SET TRANSACTION ISOLATION LEVEL REPEATABLE READ BEGIN TRANSACTION ;'+
' insert into FA0TY1 (num_reg,TIP_REG,TIP_DOC,CVE_DOC,CVE_ART,CANT,PXS,PREC,COST,IMPU1,IMPU2,DESC1,DESC2,DESC3,COMI,PAR_A NT,PAR_SIG,PAR_ASIG,ACT_INV,NUM_ALM,TIP_CAM,REG_SERIE,REG_OBS,APAR,UNI_VENTA,TIPO_PROD,U4SEC,MONFLET E,IMPU3,IMPU4'
+',IMP1APLA,IMP2APLA,IMP3APLA,IMP4APLA,TOTIMP1,TOTIMP2,TOTIMP3,TOTIMP4,TIPO_PRODT) '
+'values ('+inttostr(NREG+1)+','+inttostr(2)+','+QuotedStr('F')+','+QuotedStr(CVED)+','+QuotedStr(FORM2.Table 2.FieldBYNAME('CLAVE_ARTI').Text)
+','+inttostr(Table2.FieldBYNAME('CANT').Value)+','+inttostr(FORM2.Table2.FieldBYNAME('CANT').Value) +','+floattostr((FORM2.Table2.FieldBYNAME('PRECIO').Value*form2.moneda.Fieldbyname('tcambio').Value) )
+','+floattostr(costo)+','+inttostr(imp1)+',0,'+floattostr(table2.Fieldbyname('descr_desc').asfloat) +',0,0,0,0,0,0,'+QuotedStr('A')+','+FORM2.shownalma.Text+','+floattostr(FORM2.moneda.FieldBYNAME('TC AMBIO').Value)+',0,0,0'
+','+QuotedStr(tinve.FieldBYNAME('UNI_MED').Text)+','+QuotedStr('I')+','+QuotedStr(table2.FieldBYNAM E('lote').asstring)+',0,0,'+floattostr(imp4)
+','+inttostr(imp1a)+',0,0,'+inttostr(imp4a)+','+floattostr(totimp1)+',0,0,'+floattostr(totimp4)+',' +QuotedStr('I')+' )'
+' COMMIT TRANSACTION';
Q_linfact.ExecSQL;
este es el codigo que utilizo para guardar en una tabla , lo unico que algunas veces parece que se pegara la transaccion y cuando otra maquina ejecuta la consulta se torna muy lento ... no se si la implementacion esta correcta , que me aconsejan...