Page 1 of 1

ODBC not showing all records in linked or imported table

Posted: 15 Nov 2018, 10:38
by Steve H
Hi Bruce

Am using:Sage 50 v25.0.76.0 SBD Desktop Version 15.0.57.0. Software is up to date, it says no updates available when checking for updates.
on Windows 10 Home 64 bit. Access 2016.

When i try to import an odbc table from sage 50 it only imports 9 purchase_ledger(other tables affected too) records instead of 170. If i link to the same table then all records after record 9 show as #deleted.

Annoyingly it doesn't seem to do this all the time and doesn't seem to be dependant on reindexing/compacting sage, or decompiling/compacting the access database which means i can't rely on the tables being imported properly.

Any help would be appreciated

thanks

Steve

Re: ODBC not showing all records in linked or imported table

Posted: 15 Nov 2018, 11:38
by brucedenney
I think this is too difficult to debug from what you have said.

There are several potential issues and what we need to do is to narrow down the issue.

Can I ask that you try and link the same table into Excel and see if you have the same results there.

Can I ask if you are using the 64bit or 32bit odbc /ms office

Finally can you post the sql statement you are using to get the data.

As a general strategy with the Jet engine databases, I would drop the table and then recreate it from scratch, not sure what you are doing, appending records or altering existing data is not an easy route..

Re: ODBC not showing all records in linked or imported table

Posted: 15 Nov 2018, 12:33
by Steve H
Hi Bruce

Thanks for replying. In finding the information you asked for I may have discovered why it's not working properly as the DSN I was using said 32/64 under platform in the DSN window, so I created a new DSN which now says just 32 bit. Access and Excel are 32bit. The table seem to import fine into excel.

I was also using the following code to import the tables (from a table in access containing sage table names:
DoCmd.TransferDatabase acLink(or acImport), "ODBC Database", _
"ODBC;DSN=sage32bit;UID=**********;PWD=*********;LANGUAGE=us_english;" _
& "database=demo", acTable, rs!TableName, rs!TableName, False, True

I deleted the bit in red and now it seems to import and link ok (unless it's just decided to start working ok for the moment!)

I haven't got as far as any sql statements yet. I will probably just import the tables and work on them in access as sage doesn't seem to support right or left outer joins.

thanks

Steve

Re: ODBC not showing all records in linked or imported table

Posted: 15 Nov 2018, 12:37
by Steve H
ps just noticed the last line of your post, I'm recreating the tables from scratch, not appending to any existing tables.

Re: ODBC not showing all records in linked or imported table

Posted: 15 Nov 2018, 15:26
by brucedenney
You may have some issues if you try importing the entire table. There are several tables that have weird memo/blob fields that do not always get converted properly. I know in at least on version there were issues with one or two fields. Try using a query and bringing in just the fields you are going to use if you still have issues.

Re: ODBC not showing all records in linked or imported table

Posted: 15 Nov 2018, 15:48
by Steve H
thanks for that Bruce. so far the fields I'm using seem to importing ok, they all come in as shorttext fields.

Steve