Re: [AOLSERVER] ns_db problem

2008-04-02 Thread Xavier Bourguignon
Thank you all for the information. It is obvious that db was not in scope, so now I call: set db [ns_db gethandle gamespool] then I do my queries and everything works fine. I must apologise for this lack of judgement on my part. It was late last night when I did this. Thanks again. On

[AOLSERVER] SQL placeholders

2008-04-02 Thread Xavier Bourguignon
Hi All, Is it possible to have an SQL statement pre-written in a Tcl variable like this: set adminop_sql {select * from tadminop where status = ?} Then call this [ns_db select $db $adminop_sql 'A'], basically, is it possible to pass values for SQL to use in place of the (?) ? Thanks --

Re: [AOLSERVER] SQL placeholders

2008-04-02 Thread Andrew Piskorski
On Wed, Apr 02, 2008 at 10:18:11AM +0100, Xavier Bourguignon wrote: set adminop_sql {select * from tadminop where status = ?} Then call this [ns_db select $db $adminop_sql 'A'], basically, is it possible to pass values for SQL to use in place of the (?) ? What you're talking about is called

Re: [AOLSERVER] SQL placeholders

2008-04-02 Thread Xavier Bourguignon
Ok, so how do I get this OpenACS db_* AP to work? Do I have to add something is my config file? How do I make the calls, is there some doc somewhere about this? Thank you On 02/04/2008, Andrew Piskorski [EMAIL PROTECTED] wrote: On Wed, Apr 02, 2008 at 10:18:11AM +0100, Xavier Bourguignon

[AOLSERVER] ns_db and multibyte support

2008-04-02 Thread Rajesh nair
Hi all, We have an existing Tcl service which provides the data from mysql to clients as an HTML table. We have some records in mysql with multibye characters which are not being rendered correctly. Simple ns_db getrow does not return me the correctly encoded data form database. I have the

[AOLSERVER] using openacs db api

2008-04-02 Thread Xavier Bourguignon
Hi All, Does anybody know what is required to use OpenAcs DB API for accessing Postgres DB within aolserver? Thank you -- Xavier Bourguignon -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] with the body of SIGNOFF

Re: [AOLSERVER] using openacs db api

2008-04-02 Thread Dave Bauer
You'd have to 1) Install OpenACS http://openacs.org/ or 2) try to extract the database api procedures in http://cvs.openacs.org/cvs/openacs-4/packages/acs-tcl/tcl/ 00-database-procs.tcl 00-database-procs-postgresql.tcl 00-database-procs-oracle.tcl and take the queries out of the XML files

Re: [AOLSERVER] SQL placeholders

2008-04-02 Thread Andrew Piskorski
On Wed, Apr 02, 2008 at 02:39:57PM +0100, Xavier Bourguignon wrote: Ok, so how do I get this OpenACS db_* AP to work? You would have to install OpenACS: http://openacs.org/ However, if you are currently using AOLserver stand alone, that's probabably not what you want to do, not just in order

Re: [AOLSERVER] using openacs db api

2008-04-02 Thread Jeff Rogers
Xavier Bourguignon wrote: Hi All, Does anybody know what is required to use OpenAcs DB API for accessing Postgres DB within aolserver? OpenACS is a complete integrated platform for creating web communities; I suspect that the DB api builds on the ACS core api and as such it is not a

Re: [AOLSERVER] ns_db and multibyte support

2008-04-02 Thread Bas Scheffers
Some questions to help us, and maybe give you some hints as to what might be wrong. How did you determine the fact that the value isn't a correct Tcl string? What encoding is the database in? (UTF-8?) Are you 100% sure the data in the database is actually correct? I wouldn't think you

Re: [AOLSERVER] ns_db and multibyte support

2008-04-02 Thread Tom Jackson
Just to back up what Bas said, AOLserver has been, and probably still is, light years ahead of most systems when handling encoding issues. Tcl is essentially UTF-8, which is multi-byte. But there are so many issues involved, you have to become something of an expert. The good news is that

Re: [AOLSERVER] ns_db and multibyte support

2008-04-02 Thread Bas Scheffers
My own special recipe is to not worry about it! :) If you have a green-fields project with no existing database, all you do is: - Make sure the database is UTF-8 - Set the encoding to UTF-8 for any page returned to the client. (if you have a form on a page and the page was set to UTF-8,