Hi
correct me if I am wrong. the ::sqlhand is a global parameter that persists
from request to request.
what happens when two requests of the same page are trying to use it
together?
that is why i asked about heavy duty
Thanks and sorry for being such so precise.
Yahalom Emet
Software Developer
Xor Technologies Ltd.
----- Original Message -----
From: "Wojciech Kocjan" <[EMAIL PROTECTED]>
To: "yahalom emet" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Mod_dtcl" <[EMAIL PROTECTED]>
Sent: Monday, October 29, 2001 2:47 PM
Subject: Re: package sql
> sql.so is loaded on 'package require sql'. It is then removed when the
> apache subprocess which parses your ttml page dies (this is a Tcl rule -
> you cannot unload a module).
>
> Most people (mostly because of CGI/PHP habits) connect/disconnect once per
> page. This is a bit of a resource overhead - permanent SQL connections are
> much faster since you don't need to connect every time you make your ttml
> page, but only when Apache creates a new child process.
>
> ::sqlhand is the handle you set ie:
>
> -- I do this at ChildInit
> set ::sqlhand [sql connect $host $user $pass]
> sql selectdb $::sqlhand $dbname
>
> -- and this in an example .ttml page
> set res [sql query $::sqlhand "SELECT * FROM test"]
> while {...} {...}
> sql endquery $::sqlhand $res
>
> Actually, I use my sql::* wrappers since they're easier to use - I don't
> have to remember about endquery...
>
> ps. davidw also thinks I'm a bit strange and enigmatic person ;)
>
> --
> Wojtek Kocjan
> [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]