12.07.2015 Views

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Connection to a databaseIn <strong>OPL</strong>, database operations all refer to a database connection. Here are two examples fromthe oilDB example for declaring connections. See Supported databases for more connectionstrings.DBConnection db("odbc","oilDB/user/passwd");andDBConnection db("access","oilDB.mdb");The first example uses the ODBC data source oilDB declared by the system to connect tothe database.The connection db should be viewed as a handle on the database.Note:1. The user and passwd parameters are optional: you can connect to oilDB//without a user name and password.2. It is possible to connect to several databases within the same model.58I L O G O P L D E V E L O P M E N T S T U D I O L A N G U A G ER E F E R E N C E M A N U A L

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!