CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    May 2007
    Posts
    25

    Question How to make DAO connection in VC++ 6.0 ?

    when I added new class of type MFC class and given base class as CDaoRecordset and clicked ok,

    Wizard opens Database option dialog box ,selecting DAO radio button. When I selected Data.mdb file,it gives error

    Unrecognized Database format. My file is not corrupt ,as odbc connectivity works fine. But to avoid DSN creation I want

    DAO connectivity. Does I have to install anything,so that DAO Connectivity is possible ?if yes where can I get it.

    I have VC++ 6.0 and Access 2000.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to make DAO connection in VC++ 6.0 ?

    Try do add this line in the beginning of your App class InitInstance method:
    Code:
    AfxGetModuleState()->m_dwVersion = 0x601;
    Victor Nijegorodov

  3. #3
    Join Date
    Jan 2002
    Location
    Houston, TX
    Posts
    1,421

    Re: How to make DAO connection in VC++ 6.0 ?

    It's also possible that VC6 (very old) may not be able to handle .mdb files saved with MS Office 2003/2007, unless they are saved in a mode that's compatible with Offfice 97.

    Good luck.
    Be sure to rate those who help!
    -------------------------------------------------------------
    Karl - WK5M
    PP-ASEL-IA (N43CS)
    PGP Key: 0xDB02E193
    PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

  4. #4
    Join Date
    May 2007
    Posts
    25

    Question Re: How to make DAO connection in VC++ 6.0 ?

    Quote Originally Posted by VictorN View Post
    Try do add this line in the beginning of your App class InitInstance method:
    Code:
    AfxGetModuleState()->m_dwVersion = 0x601;
    I added the line but it didnot help,while adding the class itself ,step comes where we have to give path to mdb and there only error comes

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to make DAO connection in VC++ 6.0 ?

    What versions of DAO and MDAC are you using?
    Victor Nijegorodov

  6. #6
    Join Date
    May 2007
    Posts
    25

    Re: How to make DAO connection in VC++ 6.0 ?

    how to find that?

  7. #7
    Join Date
    May 2007
    Posts
    25

    Re: How to make DAO connection in VC++ 6.0 ?

    I have saved in access 2000 format,which is lowest one it allows to save

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to make DAO connection in VC++ 6.0 ?

    Did you ever hear that Google exists?
    Then type in in Google Search box MDAC and look at a couple of found items...
    Victor Nijegorodov

  9. #9
    Join Date
    May 2007
    Posts
    25

    Re: How to make DAO connection in VC++ 6.0 ?

    I downloaded MDAC finder tool,but as I dont have admin rights of pc ,I am unable to install it,lets see it tomorrow

  10. #10
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to make DAO connection in VC++ 6.0 ?

    Quote Originally Posted by shivditya View Post
    I downloaded MDAC finder tool,but as I dont have admin rights of pc ,I am unable to install it,lets see it tomorrow
    I wonder, how you could develop not being Admin on your developer PC!
    Victor Nijegorodov

  11. #11
    Join Date
    May 2007
    Posts
    25

    Re: How to make DAO connection in VC++ 6.0 ?

    Actually My pc is down I am at my colleagues pc,who is at present in another country

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured