Connection Parameters

You must specify connection parameters before you can create a connection object for wsodbc. PLease follow the instructions below to set up connection parameters for a connection object.
  1. Load the WSODBC libraries. You can accomplish this with the following command:
    load('wsodbc.dll');
  2. Create the object for the connection parameters. An example is shown below.
    var dbtest ={Driver={SQLNativeClient}; server:'NAME', dbname:'TEST', user:'test', pass:'test'};

    These parameters are defined as follows:

    • Driver: The driver you will use. You must have the appropriate driver for the version of the SQL server and for the database you will be connecting to. Check your server and ensure that you have the appropriate native SQL driver installed on the machine that will be connecting to the SQL server. You can find additional information about the drivers from Microsoft's MSDN Library.
    • server: The name of the database server to which you will be connecting. This can be either the name of the server or the server's IP address.
    • dbname: The name of the specific database to which you will be connecting.
    • user: The name of the specific user who will be connecting to the SQL server.
    • pass: The password of the specific user who will be connecting to the SQL server.
    Note: The connection parameters also can be passed to the connection object from a variable.
  3. Proceed to the Creating Connection Objects section.