question

Wang Yang avatar image
0 Likes"
Wang Yang asked Ben Wilson converted comment to answer

FlexSim linking with Oracle database

Background

  1. Aim:just with one click to import and visit oracle library.choose aim data and write automatically into global table
  2. The test condition for data quantity from dozes of thousands to million in library

Test situation:

We equip ODBC data source locally and visit library in below ways

  1. dbusername("CSN","CSN");
  2. dbopen("CIGflexsim","Select * From MES.MachineMenue",0);
  3. dbsqlquery("Select * From MES.MachineMenue WHERE MachineID ='15A01' OR MachineID ='16B01'");

The whole FlexSim interface is blocked when executing dbopen(). We guess the reason is too large data quantity.

FlexSim 17.0.1
oracle
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Steven Hamoen avatar image
1 Like"
Steven Hamoen answered

Hi @wang.yang I've used the Oracle OCCI. I created a seperate dll with functions that I wanted to use and included the Oracle dll's in that dll. Next I loaded that dll with the LoadLibrary function in my Flexsim dll and used a interface class that I defined in the first dll to access the oracle functions.

The reason for doing it this way was that the Oracle DLL's are all build with dynamic linking (compile option MD/MDd (meaning they require all kinds of dll on the system where it is installed) and Flexsim dll's are build with static linking (compile option MT/MTd).

So I got it working and it works very well concerning speed and available options, compared to the ODBC route, but it took quite some time to figure everything out.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.