Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: ADO SaveAs
file = "c:\TEMP\ORDERS.MDB" table = "Orders" Conn = "Provider=MicroSoft.Jet.OLEDB.4.0; Data Source=%file%;Jet OLEDB:Engine Type=4" DB = ObjectOpen("ADODB.Connection") DB.Open(Conn) *****???? db.save or db.convert ????????******* DB.Close() ObjectClose(DB) exit
cMDB = "C:\TEMP\MyMDB.MDB" cXLS = "C:\TEMP\TEMP\.XLS" cSheet = "MySheet" cTable = "MyData" cIsam = "Excel 8.0" cSQL = "SELECT * INTO [%cIsam%;DATABASE=%cXLS%].[%cSheet%] FROM [%cTable%]" cConn = "Provider=MicroSoft.Jet.OLEDB.4.0; Data Source=%cMDB%" DB = ObjectOpen("ADODB.Connection") DB.Open(cConn) RS = DB.Execute(cSQL) DB.close() ObjectClose(DB) drop(DB,RS,cSQL,cConn)You get a pretty neat 'side-effect' (you may get the same with DAO, I don't know ) - but by selecting into another data type, ACCESS will either update or create schema.ini in the dir you ran the script from. You get a modest data-dictionary of your table- an excellent bodyguard for the LAFF Extender.
Also remember, when exporting to text/dbase or paradox, your DATABASE= is only the path, not the full file; Excel is an exception since each 'tab' can be a database.
Article ID: W15236
File Created: 2002:09:05:13:50:46
Last Updated: 2002:09:05:13:50:46