Creating an ODBC Data Source from an SQL Server Database

LINGO installs an SQL script that can be run by the SQL Analyzer utility in SQL Server to build a small database for the TRANDB.LG4 transportation model. The script file is named TRANDB_SQL.SQL and may be found in the SAMPLES folder off the main LINGO directory. Here is the procedure you will need to follow to set up this data source:

1.Start up the SQL Analyzer utility provided with SQL Server by going to the Start menu in Windows, selecting the Programs command, selecting the Microsoft SQL Server program group, and then clicking on Query Analyzer.
2.Point the Query Analyzer to the machine running SQL Server.
3.Run the File|Open command and select the script file TRANDB_SQL.SQL from the LINGO samples folder.
4.Run the script by issuing the Query|Execute command.
5.Exit the Query Analyzer.
6.Start up the ODBC Administrator as described in the section above: Creating an ODBC Data Source from an Access Database.
7.Press the Add button to add a new ODBC data source:  Select the SQL Server ODBC drive, assign the data source the name "Transportation", and select the appropriate server machine.
8.You should now be able to load TRANDB.LG4 into LINGO and solve it.

 

Note:If you plan to use LINGO’s ODBC interface to write solutions to a table in SQL Server, then the table must contain a field that is declared as a unique identifier.  Failure to do so will result in an error message claiming that the table is read-only.