MODDBC, an ODBC-like tcl extension. MODDBC is a tcl extension to allow one set of commands to access many different types of SQL databases. Right now, Postgres, MS SQL server, Sybase, and mSQL databases are supported. I am planning to support Oracle, Informix, and MySQL soon, and any other SQL databases as tcl extensions get created for them. To use MODDBC, you must have the underlying tcl extensions for the SQL databases that you want to connect to installed. e.g. If you want to use MODDBC with Sybase databases, you must have the sybtcl extension installed. ------------------------------------------------------------------------------ db_connect db_type db_name host port user password Connects to a database and returns a handle for further operations on it. db_type can be one of pg (Postgres), msql (mSQL), or sybase (MS SQL server and sybase). ------------------------------------------------------------------------------ db_sql handle cmd Executes a SQL command on the database connected to handle. ------------------------------------------------------------------------------ db_next handle Returns the next row of data from the last db_sql command ------------------------------------------------------------------------------ db_colnames handle Returns the column names from the last db_sql command ------------------------------------------------------------------------------ db_coltypes handle Returns the column types from the last db_sql command ------------------------------------------------------------------------------ db_colsizes handle Returns the column sizes from the last db_sql command ------------------------------------------------------------------------------ db_tblsql handle table Returns a SQL statement that would create the schema for the table specified ------------------------------------------------------------------------------ db_copytable handle table otherhandle Copies a SQL table from the database connected to handle to the database connected to otherhandle ------------------------------------------------------------------------------ db_disconnect handle Disconnects from a database ------------------------------------------------------------------------------ tcl2csv tclstring qc cc Returns a Comma Separated Values string equivalent to the tclstring specified, using qc as the quote character and cc as the comma character ------------------------------------------------------------------------------ csv2tcl csvstring qc cc The inverse of tcl2csv ------------------------------------------------------------------------------