Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Here's a sample of the code I am trying to use:
cConn = "Provider=MicroSoft.Jet.OLEDB.4.0; Data Source = 'C:\Xware\Tables\TD\UMask.mdb'" DB = ObjectOpen("ADODB.Connection") DB.Open(cConn) cSQL = "INSERT INTO TableX SELECT * FROM TableX IN 'C:\Xware\Tables\TD\XMask.mdb'" DB.execute(cSQL) DB.Close() ObjectClose( DB ) ExitAny help is appreciated.
;Winbatch - inserting rows from one Access table to Another ;Stan Littlefield January 17, 2007 ;//////////////////////////////////////////////////////////////////////// cSource=StrCat(DirScript(),"ncs.mdb") ;substitute your own mdb cTarget=StrCat(DirScript(),"ncstemp.mdb") ;same here cTable = "CoopExt" cConn = "Provider=MicroSoft.Jet.OLEDB.4.0; Data Source=%cTarget%;Jet OLEDB:Global Partial Bulk Ops=1" ;Global Partial Bulk Ops requires a primary key oConn = CreateObject("ADODB.Connection") oConn.CommandTimeOut = 0 ; gives the provider unlimited time to execute nRecs=0 cSQL = 'INSERT INTO [%cTable%] SELECT * FROM [%cTable%] IN "" [%cSource%];' oConn.Open(cConn) oConn.Execute( cSQL,nRecs,-1 ) oConn.Close() oConn=0 Message("Records Inserted",nRecs) Exit
Article ID: W17112
File Created: 2007:07:03:14:28:20
Last Updated: 2007:07:03:14:28:20