Wed Oct 30 08:51:43 EST 2002 amplodbc.c, ampltabl.dll, TABLES.RME: extend the "standard" ODBC table handler to recognize new optional string maxlen=nnn (just before the optional 'verbose') among the Strings to specify the maximum length of strings (symbolic parameters) read from the table. The default is 480, which will probably suffice for most purposes. Strings longer than maxlen will be truncated to maxlen characters when the table is read. Tue Aug 5 22:51:54 EDT 2003 amplodbc.c, ampltabl.dll: have "write table" preserve old columns of an INOUT table even when the table is initially empty, and for columns of type text, retain the text type even when the column ends up having exlusively numeric values. Tue Dec 6 09:59:00 EST 2005 amplodbc.c: minor tweaks for portability to 64-bit MS Windows. Tue Jan 1 17:57:59 MST 2008 amplodbc.c: tweak for MS SQL Server 2005: for numeric values, successively try SQL_DOUBLE, SQL_FLOAT, SQL_REAL, and SQL_NUMERIC rather than SQL_DOUBLE, SQL_NUMERIC, and SQL_REAL. Wed Jan 2 23:25:35 MST 2008 amplodbc.c: adjust the date shown when "version" is specified. (Missed updating this lately when making changes.) Thu Sep 23 13:31:28 MDT 2010 amplodbc.c: attempt to pass a plausible window handle to SQLDriverConnect(). If need be, a handle can be specified by setting $sw_HWND to a hexadecimal value (without a leading 0x) in the environment passed to AMPL. With some incomplete or incorrect DRIVER=... settings, this will cause a dialogue box to appear in which corrections can be attempted. Setting $sw_HWND to 0 disables this new behavior. Ignore case for "DRIVER=", "SQL=", and "DSN=" (e.g., treat "Driver=" and "driver=" the same as "DRIVER="). Tue Nov 2 17:26:08 MDT 2010 amplodbc.c: fix a bug that led to a seldom-seen error message of the form "ColAlloc: cols[5].sinv already allocated." 20111024 amplodbc.c: Add optional strings 'nsmix=...' and 'write=append' or 'write=drop' to the possibilities for strings in table declarations for tables handled by the ODBC table handler (usually called ampltabl.dll), and allow 'verbose=n', with 0 <= n <= 3, as alternatives to 'verbose'. For details, in an AMPL session with the updated ampltabl.dll loaded, issue the command print _handler_desc['odbc']; 20120306 amplodbc.c: Fix a glitch with the default 'nsmix' that caused some numeric strings, such as 100000 (but not 10000) to be treated as string rather than numeric values. Fix a bug in parsing "write=drop" or "write=append" that sometimes resulted in an erroneous error message. fullbit.c, simpbit.c: allow optional strings 'lib-bit' or 'simple-bit'. Add source files tableproxy.c and tableproxyver.h; add rules involving them to makefile.linux and makefile.vc; omit makefile.sgi. See http://www.ampl.com/NEW/TABLEPROXY/ . 20120315 amplodbc.c: Fix a glitch in the error message for missing columns: a buffer was too small, leading to a possible fault with tables having many columns. There appears to be a bug in some versions of Microsoft's ODBC processing for Excel that causes too few columns to be reported for tables having more than 255 columns. This may only be an issue with *.xlsx files, as MS Access and Excel limit (most or all?) other kinds of files they produce to at most 255 columns. 20120402 tableproxy.c: fix faults in tableproxy*.exe in processing some error messages and recycling string buffers. 20120405 tableproxy.c: when a shared-library name (such as ampltabl.dll) does not contain a slash (or, for MS Windows, start with a drive letter), have tableproxy*.exe look in $ampl_libpath (if set) for the library. Note that AMPL versions starting with 20120404 export $ampl_libpath. When $ampl_libpath is not set, behave as though $ampl_libpath were set to the current directory. 20120530 amplodbc.c: fix a bug with error messages that prevented some possibly helpful details from being reported. 20121212 amplodbc.c: adjustments by Victor Zverovich to make ODBC table handlers for Linux with unixODBC (http://www.unixodbc.org) or iODBC (http://www.iodbc.org) in adition to MS Windows (as heretofore). README: update to mention _HANDLERS, _handler_desc, and recent extensions to simplify mixing 32- and 64-bit binaries. Split makefile.linux into makefile.linux and makefile.linux64 (for making 32- and 64-bit entities, respectively, and adjusting to include both the ODBC and tableproxy handlers in ampltabl.dll, with a new rule for tableproxy.dll that just has the tableproxy handler. 20121213 README: add descriptions of _handler_lib, _table_errmsg, and _version; add reminder that $AMPLFUNC provides full pathnames. Adding makefile.macosx32 and makefile.macosx64 for Intel MacOSX. Renaming makefile.linux to makefile.linux32. 20121219 amplodbc.c: tweaks for 64-bit Linux systems that use unixODBC but with a 32-bit type for SQLLEN (rather than the 64-bit type that unixODBC specifies). 20130214 amplodbc.c: tweak to bypass a bug with long names in Microsoft's Excel ODBC driver -- thanks to Victor Zverovich. 20130318 amplodbc.c: for connection strings involving, e.g., 'Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=.' do not complain if DBQ=... specifies a directory. 20130326 amplodbc.c: under MS Windows, ignore trailing slashes when checking the validity of DBQ=... strings. 20130417 amplodbc.c: fix a glitch in reading tables with null columns. Thanks go to Victor Zverovich for this fix. 20130507 amplodbc.c: Fix a fault when no "User DSN" or "System DSN" entries appear in the MS Windows ODBC Administrator and the filename in a table declaration ends with an unknown extension. Thanks go to Victor Zverovich for this fix. 20130607 tableproxy.c, tableprxyver.h: fix a bug in the tableproxy program that could lead to duplicate rows. Thanks go to Victor Zverovich for this fix. 20130815 amplodbc.c: fix faults with "write table" of a table that in AMPL's view is empty but whose existing file-based version contains at least one row. 20131122 tableproxy.c, tableproxyver.h: arrange for 'verbose' output (written to the printf supplied by the tableproxy table handler) to be returned to the AMPL session. This requires both a current tableproxy program and tableproxy*.dll (or ampltabl.dll that incorporates the tableproxy handler). Have the tableproxy program ignore case when comparing handler names. amplodbc.c: "invisible" tweak: use printf rather than fprintf to report a malloc failure. (This is for tableproxy, so all output comes via printf.) 20131212 amplodbc.c: under MS Windows, use GetDesktopWindow() rather than EnumWindows() to get the window handle for SQLDriverConnect(). Thanks to Victor Zverovich for suggesting this change. 20140125 tableproxy.c: fix a bug in ampltabl.dll with reading empty tables via the tableproxy handler. Have "tableproxy -v" show system details. 20140525 tableproxy.c: Read_ampl_proxy: when table reading is finished and TI->Errmsg is set, return DB_Error rather than DB_Done. 20141003 tableproxy.c: have the tableproxy program ignore SIGINT when talking with the tableproxy handler over a pipe (i.e., when invoked with --local). This prevents trouble with interactive use of AMPL when the user types control-C. Thanks to Victor Zverovich for diagnosing this issue. 20150217 amplodbc.c: fix a glitch in strcmpv() that caused it to sort on string addresses rather than string values. Thanks to peter.jackson@rtdmsolutions.com for pointing this out. 20151130 amplodbc.c: fix a glitch in reading columns with the "Strcol:" attribute: strings that looked like numbers were read as numbers. 20190307 amplodbc.c: only issue error message "Could not find SQL synonym for SQL_TIMESTAMP" if the synonym is needed. README: various updates. 20190517 TABLES.RME: fix a typo on line 124: change "->" to "<-", so the line becomes "FOOD <- [FOOD] cost, f_min, f_max;". 20210502 fullbit.c, simpbit.c, tableproxy.c: tweaks to banish pedantic compiler warnings. No change to tableproxyver.h.