I was translating an old PB 3.94 program, which uses some database queries (only SELECT).
The database is an ORACLE 11 database, and I use UseODBCDatabase().
Using PB4.xx (from 4.00 to 4.60), I get an error after the first query :
Translation :DatabaseError() after DatabaseQuery() wrote:[Microsoft][ODBC driver for Oracle]Impossible d'utiliser le curseur de table de caractères sur join, avec une clause distincte union, intersection ou moins ou sur une série de résultats en lecture seule.
I can't post the whole code, but here is the query text :DatabaseError() after DatabaseQuery() wrote:[Microsoft][ODBC driver for Oracle]Can not use the character table cursor on join with a separate union clause, intersection or with a series of read-only results.
Now, the same code gives the expected results (compared with SQLTalk) using PB3.94.Query sample wrote:Select PLAQUE.NUMERO, to_char(plaque.datec,'DDMMYYYYHH24MISS'), ELEMENT.LIB, CUPULE.X, CUPULE.Y FROM CUPULE,PLAQUE,SECTION,AUTOMATE,ELEMENT WHERE (CUPULE.PLAQUE = PLAQUE.ID) And (PLAQUE.ID = SECTION.PLAQUE)And (SECTION.DIST = AUTOMATE.ID) And (AUTOMATE.ID = ELEMENT.ID) And ((AUTOMATE.NOMEXE= 'xxxxxx') Or (AUTOMATE.NOMEXE= 'yyyyyy')) And (CUPULE.NUMERO = 'xxxxxxxx') ORDER BY PLAQUE.DATEC,PLAQUE.NUMERO ASC
Furthermore, using Srod's ADOmate_DatabaseQuery() with PB4.51 also works...
So I suppose there might be something wrong with the PB4.xx DatabaseQuery()?
(I am no database nor SQL guru...)