ODBC Recordset Indexes
-
I have got a project where I link a couple of tables from an external database to use within a local Jet (access.mdb) database, for which purpose I use the DAO classes. THE DATABASE The external database Open() call looks like this :- m_dbExtern.Open(_T(""), TRUE, FALSE, _T("ODBC;")); The empty name string combined with the "ODBC;" cause the Windows ODBC selection dialog to appear, and CDaoDatabase opens a link to that. SIDE ISSUE: Anyone know how to get this dialog to default to the SYSTEM tab rather than the USER? THE RECORDSET Originally I used the straight CRecordset classes but found DAO more flexible, but its flexible. I have a class derived from CDaoRecordset which contains static attributes mirrored to what is in the table I want to access. The ODBC links to a database table written in dataflex which has a data definition file : here is the indexes it defines :- INDEX# FIELDS DES U/C LENGTH LEVELS SEGMENTS MODE ------ --------------- --- --- ------ ------ -------- ------- 1 CODE NO NO 6 3 1 ON-LINE 2 ALPHA NO NO 9 3 2 ON-LINE RECNUM NO NO 3 CODE NO NO 8 3 2 ON-LINE EMPL NO NO 4 CODE NO NO 11 3 3 ON-LINE ALPHA NO NO RECNUM NO NO The thing is, I don't know much about these recordset classes, I just want CDaoRecordset::Open() to use INDEX #2, #3 or #4 - it is defaulting to INDEX #1. Dataflex is a pretty rare database, but it does have an ODBC driver written for it - perhaps this driver defines everything I need? Hope someone can help me....P-l-ease!!! Cheers, H. Venn