ODBC Unplugged: What’s New in the DataFlex Connectivity Kit for ODBC? John Kramel Senior Consultant Data Access Corporation
What is ODBC? Microsoft Open DataBase Connectivity interface A component of Microsoft’s Windows Open Services Architecture (WOSA) Enables applications to access data from various DBMSs Uses SQL as a standard
ODBC Supported DBMSs AS/400 (SQL/400) ASCII DB2/2 dBase II, III, IV, FoxPro, Clipper Microsoft Access Faircom C-tree plus
ODBC Supported DBMSs Informix Oracle Paradox SQL Server (Microsoft) Sybase And More!
What is the DataFlex Connectivity Kit for ODBC? Open Client/Server solution for DataFlex and Visual DataFlex Converts DataFlex data files to target tables Connects DataFlex to existing database tables
Flashback to 1996 1996 Conference ODBC Talk 1996 Conference ODBC Talk ODBC Kit still represents great business opportunities for DataFlex developers At the 1996 and 1997 conferences, the OBCD driver was still in beta Revision 1.1, along with all the other products shown at this conference, is delivering now
DataFlex Runtime (Client) ODBC API ODBC Driver ODBC Client Driver Direct Driver Target (Server) Database
All Pieces Must Be Correctly Connected
DataFlex Direct Driver Architecture DataFlex Runtime with API DataFlex Program ODBC Client Driver ODBC API ODBC DRIVERTarget Database Client Piece Transport Transport Target Database Server Piece Target Database
Set Up a DSN First This is the way that ODBC knows about the target database Use the ODBC Administator Accessible from DbBuilder when the DataFlex Connectivity Kit for ODBC is loaded Also from the Control Panel:
The Intermediate File Created automatically by VDFFile or DbBuilder Data table specific Driver name Field information Index information
Flashback to 1997 1997 Conference ODBC Talk 1997 Conference ODBC Talk With revision 1.1 of the driver, the tasks of connecting to an existing database has become much easier (easier to look at, too!) The Intermediate File is created automatically
DRIVER_NAME ODBC_DRV SERVER_NAME DSN=MS Access 97 Database DATABASE_NAME ADDRESS PRIMARY_INDEX 1 FIELD_NUMBER 2 FIELD_RELATED_FILE 3 FIELD_RELATED_FIELD 1 INDEX_NUMBER 1 INDEX_NUMBER_SEGMENTS 1 INDEX_SEGMENT_FIELD 1 INDEX_NUMBER 2 INDEX_NUMBER_SEGMENTS 2 INDEX_SEGMENT_FIELD 2 INDEX_SEGMENT_FIELD 1
Differences of Non-DataFlex DBMS’s May not be able to close & re-open May not be able to compress files File Integrity Check? May not have case-insensitive indexes May not have batch indexes
You Cannot Count On... Consistent database limitations Consistent indexing limitations Consistent naming conventions Maximum records specification
“Recnum” Must assign a unique identifier May be automatically maintained by database or manually by all programs used for access If maintained by database, may not be able to be accessed within transaction
“Recnum” Must be Numeric (This may change) Must be only segment in an index Don’t think it’ll be faster than other indexes DbBuilder can automatically create “DFRecnum” field when converting!
Date / Time Fields Time stored with date in field Can’t be handled elegantly by DataFlex Limited support added Use Intermediate File keyword FIELD_STORE_TIME to set the time portion Set to either server system time, client system time, or constant value
Things to Watch Out For Reserved Words can prevent conversion or pose difficulty later on E.g.: ORDER PRIMARY TABLE
Things to Watch Out For Target database and/or driver may or may not have limitations on “blobs” or index segment rules May have to reorganize data structure, e.g., breaking Text or Binary fields out to separate tables Also, remember that DataFlex r/t limit is 15K
Things to Watch Out For These kinds of issues will occur with each DBMS encountered Data Access cannot provide you with all the compatabilities issues for all the databases Know your target DBMS
Getting Started When you buy the VDF Professional Bundle, you have everything you need: VDF tools and runtime DataFlex Connectivity Kit for ODBC (unlimited deployment) Plus DB2 and Pervasive.SQL developer servers, drivers, FlexOLE, WinQL and more
Getting Started - Character Mode DataFlex 3.1d Console Mode Suggestion: Buy VDF, too! You get the Pervasive and DB2 kits You get a head start on VDF as well You can mix and match your application Character Mode Visual Web
Welcome to the World of Open Client/Server Development!