Hi Keith, One more question, can we call a Stored procedure? ..will this support?.. Looks like it doesn't support. Please let me know whether have used or not.
Thanks, -Durga -----Original Message----- From: Durga [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 1:08 PM To: AOLserver Discussion Subject: RE: [AOLSERVER] Informix Drivers Thanks, Keith - for your prompt response. I really appreciate it! I have to look for other options like create a VIEW instead of db operation while I use ns_db getrow..Also, except this problem, I have been doing good with your Informix driver. It's work's fine for all othet ns_db API call's. Are you aware of any other possible problems with this?! -Durga -----Original Message----- From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf Of Keith paskett Sent: Thursday, December 05, 2002 12:48 PM To: [EMAIL PROTECTED] Subject: Re: [AOLSERVER] Informix Drivers You can't perform another db operation while you are getting rows. This is a limitation of the driver that I hope will be addressed. I'm still hopefull that I will be able to come up with a couple thousand dollars for anyone willing to rewrite/update the Informix driver, but I thought that almost a year ago also. Keith | |Hi Keith, | |I have question about ns_db getrow. When I try to use multiple cursors, I |get the error message. Did you use multiple cursors? Does Informix driver |supports these? | |Here are the details about my code and error message: | |My code looks like: |. |. |foreach { db0 db1 } [ns_db gethandle informix_pool 2] {} |.... |... |.. |set row [ns_db select $db0 "select first 5 * from TABLE_X"] |while { [ns_db getrow $db0 $row] ==1 } { | ... | ... | set sysnm [ns_set value [ns_db 0or1row $db1 "select sys_nm from TABLE_Y |where sys_id = '6';"]] | ... | ... | ... | } | |ERROR: |02/Dec/2002:10:04:08][2205.382][-conn26-] Error: [IX000] (-480) A descriptor |with the same name already exists. |[02/Dec/2002:10:04:08][2205.382][-conn26-] Error: dbinit: |error(dbname_tcp:dbname,A descriptor with the same name already exists.): | |Any idea? | |Thanks a lot, Keith | |-Durga | |-----Original Message----- |From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf |Of Keith paskett |Sent: Friday, November 22, 2002 4:52 PM |To: [EMAIL PROTECTED] |Subject: Re: [AOLSERVER] Informix Drivers | | || ||Keith, || ||It works geat!!..I re-configured the AOL web server to look at Internal ||driver (iusid.so). Right now, I am able to access the data from Informix ||database. I have a question, though. Can I use all ns_** functions that ||provided by AOL web server? I have a error message when I tried to use ||ns_getrow function. Any ideas? | | |Is ns_getrow new to 3.5, or did you mean ns_db getrow? I'm using 3.3 and |ns_db getrow works fine. | |---- |set selection [ns_db select $db "select * from test_tab"] | |while { [ns_db getrow $db $selection] } { | #Data is in the ns_set $selection | ... |} |---- | |-Keith | || ||Thanks a lot!..I really appreciate your help. || ||-Durga || || ||-----Original Message----- ||From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf ||Of Keith Paskett ||Sent: Thursday, November 21, 2002 6:09 PM ||To: [EMAIL PROTECTED] ||Subject: Re: [AOLSERVER] Informix Drivers || || ||For what it's worth I never got the external driver working. ||I don't remember what the issues were but I didn't spend much ||time on it because I really wanted the internal driver iusid.so || ||Keith || ||On Thu, Nov 21, 2002 at 10:06:55AM -0700, Durga wrote: ||> Thanks, Keith, Pete. ||> ||> Here is the information about my system: ||> ||> * Operating System: SunOS 5.7 Generic_106541-18 sun4u sparc SUNW,Ultra-1 ||> * Informix: Informix Dynamic Server Version 9.30.UC3 -- On-Line -- Up ||1 ||> * AOL server: 3.5 ||> * tcl: 8.4b2 ||> * AOL server and Informix are on same machine. ||> ||> I have checked the /etc/services and $INFORMIXDIR/etc/sqlhosts, |everything ||> is set as you mentioned. ||> ||> nsd.tcl - AOL config file: ||> ||> # Database drivers ||> ns_section "ns/db/drivers" ||> ns_param informix_driver nsext.so; ||> ||> ns_section "ns/db/driver/informix_driver" ||> ns_param localdaemon iuspd; ||> ||> ns_section "ns/db/pools" ||> ns_param informix_pool "Informix Pool"; ||> ||> ns_section "ns/db/pool/informix_pool" ||> ns_param driver informix_driver ||> ns_param datasource pmdb_tcp:pmdb ||> ns_param user www ||> ns_param password ****** ||> ns_param connections 1 ||> ns_param logsqlerrors true ||> ns_param verbose false ||> ns_param maxidle 600 ||> ns_param maxopen 3600 ||> ||> ns_section "ns/server/${servername}/db" ||> ns_param pools * ||> ns_param defaultpool informix_pool ||> ||> Also, in aolserver bin directory: ||> /users/WWW/AOL/aolserver_3.5$ ls -l bin ||> -rw-r--r-- 1 www www 2255 Oct 24 14:18 install-sh ||> -rwxrwxrwx 1 www www 30989 Nov 19 23:38 iusid.so ||> -rwxrwxrwx 1 www www 2124918 Nov 19 23:39 iuspd ||> -rwxrwxrwx 1 www www 115928 Oct 24 14:19 nscgi.so ||> -rwxrwxrwx 1 www www 95296 Oct 24 14:19 nscp.so ||> -rwxrwxrwx 1 www www 81724 Oct 24 14:19 nsd ||> -rwxrwxrwx 1 www www 143344 Oct 24 14:19 nsext.so ||> -rwxrwxrwx 1 www www 99016 Oct 24 14:19 nslog.so ||> -rwxrwxrwx 1 www www 116724 Oct 24 14:19 nsperm.so ||> -rwxrwxrwx 1 www www 102344 Oct 24 14:19 nssock.so ||> -rwxrwxrwx 1 www www 96000 Oct 24 14:18 nsthreadtest ||> -rwxr-xr-x 1 www www 6540 Oct 21 14:45 tclsh8.4 ||> -rwxrwxrwx 1 www www 7388 Nov 4 16:35 wish8.4 ||> ||> Is byte size looks normal for both "iusid.so" and "iuspd"? I did have |some ||> problem while I was compiling this driver software, but they were just ||> syntax error's so changed them and then installation completed ||successfully. ||> I have used "gcc" and "gmake" to compile. ||> ||> I don't think it's a "gmake" problem. I already fixed that. ||> ||> -Durga ||> ||> -----Original Message----- ||> From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf ||> Of Keith paskett ||> Sent: Thursday, November 21, 2002 8:31 AM ||> To: [EMAIL PROTECTED] ||> Subject: Re: [AOLSERVER] Informix Drivers ||> ||> ||> Durga, ||> ||> It would help to know what your configuration is. ||> What version of Informix? Is it installed locally. How are you ||> authenticating ||> the user. ||> ||> Here's the configuration that works for me (Solaris 8 & 9). ||> ||> I'm accessing a remote Informix with the informix client software ||> installed in /usr/local/informix. I don't think the configuration ||> changes much if Informix is installed on the same box as AOLserver. ||> Unfortunately the Informix client software does not come with any way ||> to test the connection. So if you are accessing a remote server, it ||> is hard to know if failures are due to the AOLserver Informix driver ||> or the client installation / configuration. ||> ||> In /etc/services, you should have something like ||> soc1 1525/tcp #Informix data do not ||remove ||> ||> In /usr/local/informix/etc/sqlhosts, something like: ||> ids_eo_sun ontlitcp informixhost.your.domain soc1 ||> ||> I'm running ACS which uses Oracle but have hacked the ACS code so I can ||> access other databases (Informix and PostgreSQL) without interfering ||> with the way ACS gets database handles. ||> ||> Relevant sections of the AOS config file: ||> ||> ----- ||> # Datasource is of the form "connection:database" ||> # where connection is from /usr/local/informix/etc/sqlhosts ||> # User and Password are not used to authenticate (in our Informix setup) ||> # The user that AOLserver is running as needs to be authenticated ||> # in oracle without prompting for username and password. ||> ns_section ns/db/pool/noacs_eoffice ||> ns_param Driver informix ||> ns_param Connections 3 ||> ns_param DataSource "ids_eo_sun:eoffice" ||> ns_param User nsadmin ||> ns_param Password bogus ||> ns_param Verbose Off ||> ns_param LogSQLErrors On ||> ||> ns_section ns/db/pools ||> ns_param main main ||> ns_param subquery subquery ||> ns_param log log ||> ns_param noacs_pg1 noacs_pg1 ||> ns_param noacs_eoffice noacs_eoffice ||> ||> ns_section ns/server/$servicename/db ||> ns_param Pools main,subquery,log,noacs_pg1,noacs_eoffice ||> ns_param DefaultPool main ||> ||> ----- ||> ||> Since I'm using ACS, I've written procedures that match the functionality ||> of the ACS db_* procs and my test.tcl looks like the following. ||> Just use the ns_db procs instead of my nadb_* procs. ||> ||> -- ||> if [catch {ns_db gethandle noacs_eoffice} db] { ||> set eoffice_avail 0 ||> } else { ||> set eoffice_avail 1 ||> } ||> ||> if {$eoffice_avail} { ||> set sql "select value from test_table where id = 1" ||> nadb_string $db $sql -default "" ||> } else { ||> ... ||> } ||> ||> -- ||> ||> I'm only able to use one db hanldle in a page. You can get two handles ||> but you can't do an 'ns_db select' with handle2 in a loop that is using ||> 'ns_db getrow' to retrieve rows from an 'ns_db select' that used handle1. ||> ||> ||> Hope this helps. ||> Keith ||> ||> ||> | ||> |Now I have different ERROR message: ||> | ||> |************************ ||> |invoked from within chunk: 0 of adp: /pub/Pages/PM/TCL/web_example.adp ||> |[20/Nov/2002:15:24:34][1753.10][-keepalive-] Notice: keepalive: |keepalive ||> |thread starting ||> |[20/Nov/2002:17:16:24][1753.25][-conn1-] Notice: dbdrv: opening database ||> |'informix_driver:pmdb_tcp:pmdb' ||> |[20/Nov/2002:17:16:25][1753.25][-conn1-] Error: exec: process 6534 |exited ||> |from signal: 11 ||> |[20/Nov/2002:17:16:25][1753.25][-conn1-] Error: exec: process 6534 |dumped ||> |core ||> |[20/Nov/2002:17:16:25][1753.25][-conn1-] Error: dbdrv: failed to open ||> |database 'informix_driver:pmdb_tcp:pmdb' ||> |[20/Nov/2002:17:16:25][1753.25][-conn1-] Error: ||> |could not allocate 1 handle from pool "informix_pool" ||> | while executing ||> |"ns_db gethandle" ||> | invoked from within chunk: 0 of adp: ||/pub/Pages/PM/TCL/web_example.adp ||> |************************* ||> | ||> |Any ideas? ||> | ||> |Thanks ||> |-Durga ||> | ||> |-----Original Message----- ||> |From: Durga [mailto:[EMAIL PROTECTED]] ||> |Sent: Wednesday, November 20, 2002 3:57 PM ||> |To: AOLserver Discussion ||> |Subject: RE: [AOLSERVER] Informix Drivers ||> | ||> | ||> |Thanks, Doosy. ||> | ||> |I did compile and install the driver software for Informix, and ||configured ||> |the AOLserver config file - nsd.tcl. However, I am not able to connect |to ||> |database. I get the error message as: "ns_db is not enabled" ||> | ||> |Any ideas? ||> | ||> |Thanks, ||> |-Durga ||> ||> ------ ||> Keith Paskett [EMAIL PROTECTED] ||> Space Dynamics Laboratory PGP or GPG encrypted mail preferred ||> 1695 North Research Parkway 435-797-4195 ||> Logan, Utah 84341 | |------ |Keith Paskett [EMAIL PROTECTED] |Space Dynamics Laboratory PGP or GPG encrypted mail preferred |1695 North Research Parkway 435-797-4195 |Logan, Utah 84341 ------ Keith Paskett [EMAIL PROTECTED] Space Dynamics Laboratory PGP or GPG encrypted mail preferred 1695 North Research Parkway 435-797-4195 Logan, Utah 84341