After upgrading Sage Business Vision to version 2023 and the subsequent database update from Pervasive V10 to Actian V15,
Issues have arisen which affect querying the GL_TRANSACTIONS table. I am currently in contact with both Actian Support and Sage Customer Support and I'm trying to get them to talk to each other to resolve this. In the mean time, if you ever write your own software to interact with the database AND OR you use Actian Control Center to do queries (previously Pervasive Control Center), here are some tips to fix queries of yours which have likely broken.
Tips if you're still running Pervasive V10:
1. To lookup line entries for a particular TRANS_NO, you cannot do a direct string compare against the TRANS_NO, you need to use one of the following:
select * from GL_TRANSACTIONS where LTRIM(TRANS_NO) = '0000123456'
select * from GL_TRANSACTIONS where CONVERT(TRANS_NO, SQL_CHAR) = '0000123456'
Tips if you're now running Actian V15:
These are now broken:
- order by RECNO
- compare against RECNO
- group by TRANS_NO ("solution" below groups by DIVISION first and then TRANS_NO, which is fine in our case because division is the same for all line entries)
Work arounds:
select * from GL_TRANSACTIONS order by CONVERT(RECNO, SQL_INTEGER)
select * from GL_TRANSACTIONS where CONVERT(RECNO, SQL_INTEGER) = 1
select SUM(DEBIT_AMT) as SumDebit from GL_TRANSACTIONS group by DIVISION, TRANS_NO
Tips if you're connecting via CODE / ODBC / ADO.
- previously, large queries were just working but after the update they started timing out and quite fast.
This may have to do with our configuration somewhere but I think the default TIMEOUT has changed.
I think the default timeout is now 30 secs. In VBA, here is how you can increase it.
Dim DB as ADODB.Connection
Set DB = new ADODB.Connection
DB.Open "your connection string"
DB.CommandTimeout = 600 'increase timeout to 600 from 30.