Version 20 of Tclsql

Updated 2005-06-19 01:10:12

snichols I've written yet another ODBC extension for Tcl and it's been tested extensively on Windows using SQL Server 7 and SQL Server 2000. However, it should be able to work with Oracle, Access, etc and compile under Linux with the right libraries. The original version was written a few years ago. I took a college course on C/C++ and wanted to apply what I had learned, and thought this would be something fun to program. I programmed it because at work I mostly program in Tcl and VB and do not get much of an opportunity to program in C or C++.

I added a few new Tcl commands to expose more of the C style ODBC methods to Tcl. I know there's a much more popular ODBC extension already available called TclODBC that has a more Tclish feel. At the time when I wrote this, I didn't even know there was another flavor of Tcl ODBC available until after I programmed it and had posted it to sourceforge. I was still fairly new to Tcl and did not know about making an extension feel Tclish.

If anyone is interested in this extension then I can update the extension to make it be more Tclish. It does expose a few ODBC calls the original TclODBC does not, and TclODBC has a few features this one does not too. Who knows, maybe it has some useful feature that's needed? You can also get to a database using tcom through ADO ActiveX calls.

I've tested this extension with Tcl Threads and it seems stable. The only gotcha I know is to make sure this runs in a separate Tcl thread than tdom.

The project files and the Windows compiled library (DLL) can be downloaded from SourceForge.net at the following link.

https://sourceforge.net/projects/tclsql/

I have included the sources, and directions in the zipped file if you wish to review them.

Also, I've included a nifty dbtool starkit for a Windows Tk application under TclSQL 1.2 file releases. It's called DBTool.kit and DBTool.exe, and it allows a user to make changes to already existing SQL tables without having to use SQL Query Analyzer or SQL Enterprise Manager. It seems to work fine with SQL Server 7 and 2000. It should work with other DB's too, but the SQL update query within the Tcl source may have to be updated for the DBMS. The Tcl sources also show how to embed widgets into cells so a user does not fat finger a critical DB field.

I was going to put the the extension reference below, but it's included in the download anyway. Please let me know what you think of the extension and dbtool.kit package.

APN - is this based on ODBC v2 or ODBC v3? In particular, does support Unicode (NVARCHAR and NTEXT data types in SQL Server)?

EKB - apparently it supports ODBC v3. From the Sourceforge blurb:

 This extension works on all Windows platforms with Tcl versions 8.3 or
 newer and follows the SQL 3.0 ODBC API reference.














Category Package Category Database