Hi all,
I have experimented with database access via oztclodbc on Windows and I
have met the following problems (so if you try to use ODBC, this might
help you):
* the Windows distribution of Mozart IMHO lacks the
platform\win32-i486\wish\tcl\encoding directory. Without this directory,
I was unable to correctly transfer international characters back and
forth. The encoding directory can be found in the ActiveTCL install
directory at Tcl\lib\tcl8.4\encoding.
* Strings sometimes come escaped, sometimes not, from oztclodbc. I could
achieve consistent behavior by prepending "$" to each string that is
read from the db, using "select {fn concat('$', COLUMNNAME)} from
TABLENAME" and removing it in my code afterwards. However, I was unable
to transfer the characters {, }. I believe that this is a general Oz-Tcl
interface problem.
* Calling other functions in tclodbc (not via oztclodbc) is not possible
without a bit of hacking. The official tclodbc 2.3 release comes with
bad PKGINDEX.TCL. I fixed this by changing "2.3" to "2.2" inside
PKGINDEX.TCL and renaming the "tclodbc2.3" directory to "tclodbc2.2".
* SELECT from a table with one column returns a list rather that a list
of singleton lists. The solution is to "SELECT COLUMN, 0 from
TABLENAME", ignoring the extra column.
All in all, I think that Mozart needs a native ODBC interface ;-)
Hope this might help someone,
Filip
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users