Forum OpenACS Development: Re: Re: Connecting with SQLServer
Also, your code example then does something really weird:
If that code works at all, it's totally by accident. When using the -dbn switch you should never be calling "ns_db gethandle" at all. Actually, when using any of the OpenACS db_* API you should not be calling "ns_db gethandle". Also, for the -dbn feature to work you need to pass a database_name to the -dbn switch, not a database pool.set handle [ns_db gethandle "pool4" ] db_1row -dbn "pool4" "test" "select user_id from ecwork.dbo.users"
Steve Manning's example above is the right way to do it.