SQL request to other tables several bases installed in a single process SAP Sybase SQL Anywhere DbsrvXX.exe server using {PROP: SQL}

Hello everybody!

There are two physical file the two databases are mounted in the same process SAP Sybase SQL Anywhere DbsrvXX.exe server (ASA)

Question : how to get SQL Query a third-party inquiry procedure to the table working database (QueryApplicationWorkingDatabaseForQueryTable, WorkingDatabaseForQueryTable) using ResultSQLQueryDummyTable {PROP: SQL}

WorkingDatabaseForQueryTable FILE,DRIVER('SQLAnywhere'),NAME('WorkingDatabaseForQueryTable'),PRE(WDFQT),CREATE,BINDABLE,THREAD Record                   RECORD,PRE()
RecordID                    ULONG                          !                    
Arrival                         DECIMAL(7,2)           
Expense                     DECIMAL(7,2)       
                         END
                     END                       
ResultSQLQueryDummyTable FILE,DRIVER('SQLAnywhere','/TURBOSQL=True'),NAME('ResultSQLQueryDummyTable'),PRE(RSQLQ),CREATE,BINDABLE,THREAD Record                   RECORD,PRE()
RecordID                    DECIMAL(15,2)                  !                    
ResultArrivalByQuery        DECIMAL(7,2)      
ResultExpenselByQuery       DECIMAL(7,2)  
                         END
                     END  

QueryApplicationWorkingDatabaseForQueryTable - Working database in same process DbsrvXX.exe SAP Sybase SQL Anywhere

TheSQLQueryString = 'SELECT SUM (Arrival) FROM QueryApplicationWorkingDatabaseForQueryTable.DBA.WorkingDatabaseForQueryTable'                     

Help, need working Clarion code

P.S. In MSSQL no problem!

P.P.S In SAP Sybase SQL Anywhere DbsrvXX.exe server (ASA) to other databases in procedure SQL Query no access to table database?

If you post your Clarion code for MSSQL that is working maybe someone with SQLA experience can spot something that could be causing it not to work?

For MSSQL Clarion Driver Clarion Code working fine!

TurboSQLQuery       PROCEDURE
 CODE
          
          OPEN(ResultSQLQueryDummyTable)

        !TheSQLQueryString ='SELECT TOP 1000 [RECORDID],[ARRIVAL],[EXPENSE] FROM [master].[dbo].[WorkingDatabaseForQueryTable]' 
                        
               
           TheSQLQueryString = 'SELECT SUM (ARRIVAL) FROM [master].[dbo].[WorkingDatabaseForQueryTable]' 
 

 ResultSQLQueryDummyTable{PROP:SQL} = TheSQLQueryString

 Loop 
    
         

 Next(ResultSQLQueryDummyTable)
 
      
!        MESSAGE (RSQLQ:RecordID)
!        MESSAGE (RSQLQ:ResultArrivalByQuery)
!        MESSAGE (RSQLQ:ResultExpenselByQuery)
        
        
         If ErrorCode()
    Break
  END          
 END
 MESSAGE (RSQLQ:RecordID)
        CLOSE(ResultSQLQueryDummyTable)

SQL Query SAP Sybase SQL Anywhere Multiple Databases in DbsrvXX.exe single process

Solutions - Remote Server & Proxy Tables!

How to do without the Remote Server & Proxy Tables?