Originally posted by: Krishnendu Mukherjee
Hi,
To connect SQL database from OPL we need to add any .dat file and in the .dat file we need to write the two line code as per the manual:
DBConnection db("oledb", "user/password/master/myserver\\SQLEXPRESS");
Persons from DBRead(db,"select NAME,EMAIL,AGE from PEOPLE");
where Persons is a tuple with the above attributes mentioned in the SQL string.
For example, database name is tempdb, dbserver name is name of the computer or host name, and SQLEXPRESS is the instance name. Username and password is blank.
Please let me know the connection string format as " temdb/127.0.0.1\\SQLEXPRESS" is not working?
Thanks,
#DecisionOptimization#OPLusingCPLEXOptimizer