Configure AOLserver to make the ODBC connection
- For this you'll need to modify your nsd.tcl. Below we've
included the sections/parameters you'll need to add. If
you have questions about the specifics of the parameters
we mention consult the
Configuration File Reference section of the AOLserver
Admin Guide.
First you'll need to set the driver to be loaded into
AOLserver. Add
ns_param nsodbc nsodbc.so
to the ns/db/drivers section of your nsd.tcl. If the
section doesn't exist you'll have to create it:
ns_section "ns/db/drivers"
ns_param nsodbc nsodbc.so
Next configure a database pool in AOLserver. Add a
section named ns/db/pool/YourPoolName and specify the
necessary parameters. The datasource parameter should be
the name of your DSN. For the specifics of what the
parameters can be see the
ns/db/pool section of the Configuration File Reference;
you'll probably only need the parameters in our example:
ns_section "ns/db/pool/odbctest"
ns_param Driver "nsodbc"
ns_param Connections "5"
ns_param Datasource "DataSourceName"
ns_param User "sa"
ns_param Password "saPassword"
ns_param Verbose "On"
Add an entry under ns/db/pool to specifiying the new
pool and give the database pool a description. Example:
ns_section "ns/db/pools"
ns_param odbctest "MS SQL Server test"
Finally, make sure your ns/server/server-name/db
section has access to your pool and the DefaultPool is set
to what you want. Example: ns_section "ns/server/${servername}/db"
ns_param Pools *
ns_param DefaultPool "odbctest"