Description
Store data from Access database (file Transportation.accdb) into a GDX file. Note that the results are queried using SQL2GMS within the model SQLSr0. The results are written to include files at first. Afterwards, they are included to the model and the data is finally stored in Transportation.gdx using the command-line argument 'gdx='. The GDX file is displayed using the 'gdxviewer' tool. This model is referenced in section "Strategies" from the SQL2GMS Documentation. Keywords: SQL2GMS, data exchange, GAMS language features
Category : GAMS Data Utilities library
Main file : SQL2GDX1.gms includes : Transportation.accdb SQLSr0.gms SQL2GDX1.gms
$title Creates a GDX File using SQL2GMS at execution Time and displays it in GDXVIEWER (SQL2GDX1,SEQ=055)
$onText
Store data from Access database (file Transportation.accdb) into a GDX file.
Note that the results are queried using SQL2GMS within the model SQLSr0.
The results are written to include files at first. Afterwards, they are
included to the model and the data is finally stored in Transportation.gdx
using the command-line argument 'gdx='.
The GDX file is displayed using the 'gdxviewer' tool.
This model is referenced in section "Strategies" from the SQL2GMS Documentation.
Keywords: SQL2GMS, data exchange, GAMS language features
$offText
$callTool win32.msappavail Access
$if errorlevel 1 $abort.noError "No Access available"
execute '=gams.exe SQLSr0 lo=%GAMS.lo% gdx=Transportation.gdx';
abort$errorLevel "step 0 failed";
execute '=gdxviewer.exe Transportation.gdx';