THANKS EVERYBODY WHO HELPED ME GET THIS DONE. ESPECIALLY TO FRANK.

-----Original Message-----
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of Tony Wells
Sent: Tuesday, April 10, 2001 3:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [AOLSERVER] Connect To SQL Server(NewBie)


I use MySQL, and it returns table.field as the key, I don't know
about SQLserver but you might try:

set table [ns_set get $row MQUser.name]


>From: Prakash Sinha <[EMAIL PROTECTED]>
>Reply-To: AOLserver Discussion <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: [AOLSERVER] Connect To SQL Server(NewBie)
>Date: Tue, 10 Apr 2001 15:05:31 -0400
>
>Hey Frank :)
>It worked now there is no error but it does not display records
>
>                                   set db [ns_db gethandle]
>                                   set sql "select * from MQUser"
>                                   set row [ns_db select $db $sql]
>                                   while {[ns_db getrow $db $row]} {
>                                          set table [ns_set get $row name]
>                                          ns_puts $table
>                                   }
>
>any idea?
>
>Prakash
>-----Original Message-----
>From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
>Of Franclim Félix Bento
>Sent: Tuesday, April 10, 2001 2:01 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [AOLSERVER] Connect To SQL Server(NewBie)
>
>
>Hi,
>
>You need also this section:
>
>
>#
># Server database pools
>#
>ns_section "ns/server/${servername}/db"
>ns_param   Pools        *
>ns_param   DefaultPool "odbc_pool"
>
>I hope this helps...
>
>Frank
>
>
>
>-----Original Message-----
>From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
>Of Prakash Sinha
>Sent: terça-feira, 10 de Abril de 2001 15:27
>To: [EMAIL PROTECTED]
>Subject: [AOLSERVER] Connect To SQL Server(NewBie)
>
>
>I have these two files, config.tcl has been modified to accomodate Database
>Driver and Pooling
>config.tcl
>#
># Database Pool
>#
>ns_section "ns/db/pool/odbc_pool"
>ns_param   Driver        "nsodbc"
>ns_param   Connections   "5"
>ns_param   Datasource    "wireless"
>ns_param   User          "Sprint"
>ns_param   Password      "Sprint"
>ns_param   LogSQLErrors  "on"
>ns_param   Verbose       "on"
>
>ns_section   "ns/db/pools"
>ns_param   odbc_pool   "SQL Server Pool"
>
>In this file i use this piece of code and it throws an error
>firstAdp.adp
>set db [ns_db gethandle] ********************This is where it says is an
>error*******************
>set sql "select * from tables"
>set row [ns_db select $db $sql]
>
>can somebody figure out whats wrong with this piece of code, it throws an
>error
>         command "ns_db" is not enabled
>                 while executing
>         "ns_db gethandle"
>
>Any idea anybody?
>
>Prakash
>
>Prakash

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to