On 2001.08.23, Mark Hubbard <[EMAIL PROTECTED]> wrote:
> I have a Linux box running nsfreetds! Both it and freetds seemed to build
> correctly on the first try, and the server loads the module.
Awesome.
> There is no message at all in the server log when the page is hit. I have
> the log on a console ( -f ).
Nothing interesting in log/server.log? Hmm.
> My server is an MS SQL Server 7 so I use tds7.0.
That's right. Cool.
> I was forced to make a couple of guesses/assumptions when configuring it,
> where the docs were sparse. One was "what goes in the ns_param Datasource
> for the nsfreetds driver" ? I guessed the server name from the interfaces
> file. Another was "what to pass to ns_db gethandle" ?
ns_param Datasource <SERVER>
where <SERVER> is the name you assigned to the server in your
interfaces file.
ns_db gethandle <poolname> -- whatever you named the pool in
your nsd.tcl file.
> #
> # MARK'S STUFF
> # aolserver.com/docs/admin/driv-ch5.htm#38973
> #
> ns_section "ns/db/drivers"
> ns_param freetds nsfreetds.so
>
> ns_section "ns/db/pools"
> ns_param mypool "this pool will point to SQL on markhpc"
>
> ns_section "ns/db/pool/mypool"
> ns_param Driver freetds
> ns_param Datasource "markhpc"
> # i have a feeling this should refer to a server in "interfaces" file
> # or it might be TCP/IP hostname port
> ns_param Connections 1
> # this is max # concurrent connections to SQL.
> ns_param LogSQLErrors on
> ns_param User sa
> ns_param Password ""
> ns_param Verbose on
>
> ns_section "ns/server/server1/db"
> ns_param Pools *
This all looks right, at first glance.
> # patch removed $datasource from the gethandle command
> if [catch {set db [ns_db gethandle]} err] {
Bad idea. You didn't specify a defaultpool in your
nsd.tcl, so you have to specify the pool to ns_db gethandle
here. The right answer is to put it back to [ns_db gethandle $datasource].
> <p>Datasource: [switch -exact $datasource {
> markhpc { return "markhpc SQL Server" }
Did this right, cool.
> <p>Datasource:
> <select name="datasource">
> <option value="markhpc">markhpc SQL Server</option>
Got this right, too. Cool.
So, where's your interfaces file? Also, how are you starting
up nsd?
-- Dossy
--
Dossy Shiobara mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/