Hi Erel
There are in fact three commands
1. set identity_insert on
2. insert the data
3. set identity_insert off
the commands as I have them in my config file are below
sql.set_Insert_On=SET IDENTITY_INSERT SWArchive ON
sql.set_Insert_Off=SET IDENTITY_INSERT SWArchive OFF
sql.Insert_into_Archive=INSERT INTO SWArchive (id,DateArrived,collfrom,Registration,PartNumber,Colour,wheeltype,Strip,STRAIGHTENING,Start,Finish,initst,Comments,MachStart,machfinish,initmach,StructTest,qc,CUSTOMER,CUSTOMERID,COMPANY,COMPANYID,DateCreated,Completed,Username,primer,WheelDesc,wheelmake,WheelSize,Damaged,DateLeft,Orderno,Invoiced,networklocation,diskno,
dateworked,notes,wheeltypeid,repairtype,OffMonitor,OnMonitor,Monitor,tyrecharge,logisticcharge,tps) SELECT id,DateArrived,collfrom,Registration,PartNumber,Colour,wheeltype,Strip,STRAIGHTENING,Start,Finish,initst,Comments,MachStart,machfinish,initmach,StructTest,qc,CUSTOMER,
CUSTOMERID,COMPANY,COMPANYID,DateCreated,Completed,Username,primer,WheelDesc,wheelmake,WheelSize,Damaged,DateLeft,Orderno,Invoiced,networklocation,diskno,
dateworked,notes,wheeltypeid,repairtype,OffMonitor,OnMonitor,Monitor,tyrecharge,logisticcharge,tps from SWMain WHERE completed = 1
I think the problem is that the identity insert is an MSSQL session and therefore both the 'set set_Insert_On' command and 'Insert_into_Archive' command have to be executed in the same session. I have seen that you can send a batch command with jRDC2 but don't know how to do it. A hint on how to do it would be helpful.
Regards
David