AnsweredAssumed Answered

Problems with opening a MS Access database from Mosel on a Linux platform

Question asked by Christian Skar on Apr 17, 2012
Latest reply on Sep 29, 2014 by Susanne.Heip

Hi,

I'm trying to work with Microsoft Access databases in Mosel on a Linux platform using the unixodbc driver manager and Easysoft odbc drivers. I have almost managed to get this to work properly (I can read tables and store these in Mosel arrays with known dimension), but for some reason I can't get the SQLexecute command in Mosel to work with a set as the second argument. An example:

 

model "ODBC example based on Blend 4 from the example repository"    uses  "mmodbc", "mmxprs"    declarations
      ORESRNG = 1..2                      
      ORES: set of integer                 
      COST: array(ORES) of real
      AVAIL: array(ORESRNG) of real
   end-declarations   ! Read data from the Access database blend.mdb   SQLconnect('DSN=Access; DBQ=blend.mdb')   SQLexecute("select ORES from MyTable", ORES)
   SQLexecute("select COST from MyTable", COST)
   SQLexecute("select AVAIL from MyTable", AVAIL)
   SQLdisconnect

   writeln(ORES)
   writeln(COST)
   writeln(AVAIL)
end-model

 The output here is (the database blend.mdb is the same in the repositories)

{}[]
[60,45]

 Does anyone have an idea of why this fails? (it works on Windows)

Outcomes