Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ODBC Recordset Indexes

ODBC Recordset Indexes

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpquestiontutorial
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Henry Venn
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups