This is the 9th model in a series of tutorial examples. More...
#include <vector>
#include "gams.h"
#include <iostream>
#include <QCoreApplication>
#include <QtSql>
Go to the source code of this file.
Functions | |
string | getModelText () |
Get model as string. | |
void | readSet (QSqlDatabase sqlDb, GAMSDatabase db, string strAccessSelect, string setName, int setDim, string setExp="") |
Read GAMSSet from MS Access. | |
void | readParameter (QSqlDatabase sqlDb, GAMSDatabase db, string strAccessSelect, string parName, int parDim, string parExp="") |
Read GAMSParameter from MS Access. | |
GAMSDatabase | readFromAccess (GAMSWorkspace ws) |
Read data from MS Access into a GAMSDatabase. | |
void | writeVariable (QSqlDatabase sqlDb, GAMSDatabase db, string varName, vector< string > domains) |
Write GAMSVariable to MS Access. | |
void | writeToAccess (GAMSWorkspace ws, GAMSDatabase db) |
Write GAMSDatabase to MS Access. | |
int | main (int argc, char *argv[]) |
Detailed Description
This is the 9th model in a series of tutorial examples.
Here we show:
- How to fill a GAMSDatabase by reading from MS Access
Definition in file transport9.cpp.
Function Documentation
◆ getModelText()
string getModelText | ( | ) |
Get model as string.
Definition at line 52 of file transport9.cpp.
Referenced by main().
◆ main()
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 251 of file transport9.cpp.
◆ readFromAccess()
GAMSDatabase readFromAccess | ( | GAMSWorkspace | ws | ) |
Read data from MS Access into a GAMSDatabase.
Definition at line 153 of file transport9.cpp.
Referenced by main().
◆ readParameter()
void readParameter | ( | QSqlDatabase | sqlDb, |
GAMSDatabase | db, | ||
string | strAccessSelect, | ||
string | parName, | ||
int | parDim, | ||
string | parExp = "" ) |
Read GAMSParameter from MS Access.
Definition at line 126 of file transport9.cpp.
Referenced by readFromAccess().
◆ readSet()
void readSet | ( | QSqlDatabase | sqlDb, |
GAMSDatabase | db, | ||
string | strAccessSelect, | ||
string | setName, | ||
int | setDim, | ||
string | setExp = "" ) |
Read GAMSSet from MS Access.
Definition at line 99 of file transport9.cpp.
Referenced by readFromAccess().
◆ writeToAccess()
void writeToAccess | ( | GAMSWorkspace | ws, |
GAMSDatabase | db ) |
Write GAMSDatabase to MS Access.
Definition at line 223 of file transport9.cpp.
Referenced by main().
◆ writeVariable()
void writeVariable | ( | QSqlDatabase | sqlDb, |
GAMSDatabase | db, | ||
string | varName, | ||
vector< string > | domains ) |
Write GAMSVariable to MS Access.
Definition at line 184 of file transport9.cpp.
Referenced by writeToAccess().