Tcl doesn't implement the null concept. 'set foo ""' sets foo to the
empty string, not null.
Right but there's a big difference between this
set val NULL
set sql "update mytable set mycolumn=$val"
and this
set val NULL
set sql "update mytable set mycolumn=[ns_quotedb $val]"
I'm not sure what would happen if you had actual binding, like the
oracle driver and did this
set val NULL
set sql "update mytable set mycolumn=:val"
but I suspect it would work as expected (you'd get NULL in the column).
With ns_dbquote it would depend on what type the column was, if it was
text/string based you'd get the actual string "NULL", with something
like a date or an integer, it would probably throw an error.
The compatibility mode, as it's described (never used it) is very nice
but probably doesn't act like actual variable binding in every possible
case?
----
Don Baccus
http://donb.photo.net
http://birdnotes.net
http://openacs.org
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.