Creating ODBC data sources

You need an ODBC data source on the client computer for each database you want to access using ODBC. A data source describes how to connect to data on a network. For example, a data source may include the name of a database, the server where it resides, and the network used to access the server.

NoteThe AUTOSTOP parameter is required in file data sources and odbc.ini files. Always be set to NO.

On Windows XP and 2000, the ODBC Administrator adds new data sources for you. Each data source allows you to access a database over a network by means of ODBC.

StepsCreating an ODBC data source

On Windows, the ODBC Administrator adds new data sources for you. Each data source allows you to access a database over a network by means of ODBC.

  1. Click Start, point to Programs | Sybase | Sybase IQ 15.1 .

  2. Choose the option appropriate for your operating system:

    • ODBC Data Source Administrator 32 bit

    • ODBC Data Source Administrator 64 bit

  3. On the Create New Data Source dialog, choose the Server IQ driver, then click Finish.

  4. When you return to the ODBC Configuration dialog, type a Data Source Name in the Data Source Name box.

  5. Click the Login tab, type a database User ID and Password in the appropriate text boxes.

  6. Click the Database tab. Do one of the following:

    • If the data source is on a remote machine, type the server name and database file name. (The database file is used only if the database is not started automatically on server start-up.)

    • If the data source is on your local machine, type a start line and database name (without the .db extension).

    • If the data source is on a remote system, click the Network tab, and select the appropriate protocol and options.

      For example, to use TCP/IP to connect to server on a host named localhost2k and port 1870, click the TCP/IP box and type host=localhost2k:port=1870 in the text box.

    You can also use the host network address:

    host=157.133.66.75:1870
    
  7. Click OK to return to the ODBC Data Source Administrator.

NoteYou cannot connect to a Sybase IQ 15.1 server using an ODBC Data Source Name created for a 12.5 server, even if you specify the same server name, port number, and database name. Use the ODBC Data Source Administrator to remove DSNs created in 12.5 and add new DSNs.

You can use files as data sources instead of databases. File data sources are stored as files with the extension .dsn. For information about creating a file data source, see the System Administration Guide.

StepsTesting an ODBC data source

  1. Start the database.

  2. In the ODBC Data Source Administrator, select your new data source from the list of User Data Sources.

  3. Click Configure.

  4. On the ODBC Configuration dialog box, click Test Connection.

    If you cannot access the data source, check that you have filled out the various tabs with correct file and path names.