Copying all records from an object to a local table

ColinD

New member
Local time
Today, 22:34
Joined
Apr 30, 2010
Messages
9
Hi, my application has a MS Access 2007 front end and a SQL Server 2005 back end. I also get data from sage line 50 using sage data objects.

What I want to do is populate a temporary, local table in Access with data from a sage table.

I could do it by reading the sage table a row at a time and then writing the row to the access table, but it would seem to me to be a lot more efficient if I could simply copy the whole table to Access in one go.

I get the records from the sage table "SALES_LEDGER" by using the following line:

Set oSalesLedger = oWS.CreateObject("SALES_LEDGER")

Now I want to copy every record in oSalesLedger to a temporary Access table.

Is it possible to do this?

Thanks

Colin
 
what is a sage data object?

if it is an Excel Worksheet (oWS object) just use the transferspreadsheet statement.

HTH:D
 
i use a local table with the same fields, and just do an append query to load all the sage data.

it's a snapshot, but it does mean that users who cant see the sage ledgers can still use the customer files

if you do it that way,, you have to watch out for extra fields - sage seem to add a few more with each release
 

Users who are viewing this thread

Back
Top Bottom