The changes in version 1.2 were directed at bringing the ODBC and native MySQL connector interfaces into better alignment. These include some minor changes to the cmdhdr structure (to support negative integer values), renaming of some of the symbols in SQL.DEF, and renumbering of a couple of the opcodes. In general, we intend to at least try to avoid changes that affect compatibility, but since the connector interface is still in its initial beta phase, we figured it was better to make ”improvements” for the long run, rather than “hacks”. In order to minimize confusion, we’ve recompiled all the utility programs and subroutines and given them all versions starting with 1.2. In addition, most of them now check their own version against the connector version and warn you if they are not up to date.
At this point, the A-Shell ODBC connector is approximately as capable as the original A-Shell MySQL connector, which is to say that it can be used to execute SQL statements to query, insert, modify, and delete data in compatible databases for which you have the appropriate privileges. Some of the weaknesses remaining to be addressed in subsequent releases are: improved data binding, record-level operations, improved programming and runtime efficiencies, improved record-set handling and updating, improved consideration of concurrency issue, setc.
The noteworthy specific changes in version 1.2 are as follows:
• | Rename the SQL_TYPE_xxx (data type) symbols (in SQL.DEF) to ASQL_TYPE_xxxx. The prefix “SQL_” is now reserved for symbols whose values match the Windows ODBC definitions. This is perhaps not of consequence to Basic applications, but is important to the interface, since those values can be passed directly through to the client API. |
• | New opcodes SQLOP_GET_CONNATR and SQLOP_SET_CONNATR (get/set connection attributes), SQLOP_GET_STMATR and SQLOP_SET_STMATR (get/set statement attributes), and SQLOP_DATA_SOURCES (display available data sources) added. |
• | Opcode SQLOP_OPTIONS (5) has been discontinued and replaced with SQLOP_SET_CONNATR (15). The functionality for the MySQL connector is unchanged, but since the operation is equivalent to what ODBC refers to as setting “Connection Attributes”, and since we already added SQLOP_SET_STMATR for setting “Statement Attributes”, we decided to adopt the ODBC semantics here. |
• | Change the B,2 and B,4 fields in the cmdhdr (ST_SQL_CMDHDR) structure to I,2 and I,4 to allow for negative values. |
• | SQLOP_FETCH_COLUMNS (10) renamed to SQLOP_GET_COLDEFS. The new name is slightly more clear (since it retrieves column definition information, not column data), and parallels the new SQLOP_SET_COLDEFS (11). |
• | SQLCON.SBX (standard connection dialog) enhanced to support ODBC and offer a dialog to display and select from the available data sources. |
• | XTRSQ1.SBX (Xtree Standard Query utility) now saves queries in a file SQRY1.TXT and a “History” button has been added to allow you to review / edit / copy previous queries. Extremely handy when experimenting and learning as working queries can be hard to remember. |
• | SQLTEST1 updated to check connector version and to support ODBC. |
• | SQLTEST2 updated to support ODBC. |
• | New sample program SQLTEST4 illustrates setting statement attributes, creating a new table, inserting, modifying, deleting records. |
• | New Fn’SQL’State$() function (fnsqlstate.bsi) to display the text associated with the 5 character standard SQLSTATE (cmdhdr.sqlstate). It’s usage is illustrated in SQLTEST2 and SQLTEST4. |
• | New symbol ASQL_CUR_CONNECTOR_VER in SQL.DEF defined to specify the current major.minor version of the ASQL connector developer tools. New function Fn’SQL’Check’Ver() (fnsqlckver.bsi) simplifies checking if the compiled connector is current relative to the SQL.DEF. |
• | New Fn’SQL’StmAtr$() function (fnsqlatr.bsi) (work in progress) helps debugging by displaying the symbolic name of a value associated with a particular attribute. |
|