MFC and MS Access - Programmer

This is a discussion on MFC and MS Access - Programmer ; Hi NG Can you please help me with a link or some code for communicating with MS Access. Until now I have used fstream and a textfile as my DB, but I will like to try to communicate with a ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: MFC and MS Access

  1. MFC and MS Access

    Hi NG

    Can you please help me with a link or some code for communicating with MS
    Access. Until now I have used fstream and a textfile as my DB, but I will
    like to try to communicate with a "real" DB.

    Thanks
    AHR



  2. Re: MFC and MS Access

    Check out the CDatabase classes.

    --
    -------------------------------------------------------------------------
    Free software - Baxter Codeworks www.baxcode.com
    -------------------------------------------------------------------------


    "AHR" wrote in message
    news:4128d876$0$225$edfadb0f@dread14.news.tele.dk. ..
    > Hi NG
    >
    > Can you please help me with a link or some code for communicating with MS
    > Access. Until now I have used fstream and a textfile as my DB, but I will
    > like to try to communicate with a "real" DB.
    >
    > Thanks
    > AHR
    >
    >




  3. Re: MFC and MS Access

    On Sun, 22 Aug 2004 19:31:32 +0200, "AHR" wrote:
    If you are referring to MS Access as a real database. Forget it, this
    atrocity of a database is not even thread safe, provides no record
    locking.
    For real databases use Firebird, MySQL, PostgreSQL, SleepyCat or the
    Humongous SAP
    Unless you are using this database on a single machine and never write
    to the database in any other thread than one you are going to have
    database corruption and/or overwrites.

    >Hi NG
    >
    >Can you please help me with a link or some code for communicating with MS
    >Access. Until now I have used fstream and a textfile as my DB, but I will
    >like to try to communicate with a "real" DB.
    >
    >Thanks
    >AHR
    >


    Wizzing across the internet.

  4. Re: MFC and MS Access


    > On Sun, 22 Aug 2004 19:31:32 +0200, "AHR" wrote:
    > >Can you please help me with a link or some code for communicating with MS
    > >Access. Until now I have used fstream and a textfile as my DB, but I will
    > >like to try to communicate with a "real" DB.



    In article ,
    MicroFace wrote:
    > If you are referring to MS Access as a real database. Forget it, this
    > atrocity of a database is not even thread safe, provides no record
    > locking.
    > For real databases use Firebird, MySQL, PostgreSQL, SleepyCat or the
    > Humongous SAP
    > Unless you are using this database on a single machine and never write
    > to the database in any other thread than one you are going to have
    > database corruption and/or overwrites.


    The answer is the same for both MS Access and the other brands:

    You use the ODBC control panel to register a .mdb file as a data source
    (or for that matter, any of the other brands as an ODBC data source),
    then use CDatabase to connect to the database, and CRecordset to
    represent the sequence of rows you get back from an SQL SELECT query.

    The MFC CDatabase and CRecordset classes give you convenient tools for
    manipulating collections of SQL tables.

  5. Re: MFC and MS Access

    > The answer is the same for both MS Access and the other brands:
    >
    > You use the ODBC control panel to register a .mdb file as a data source
    > (or for that matter, any of the other brands as an ODBC data source),
    > then use CDatabase to connect to the database, and CRecordset to
    > represent the sequence of rows you get back from an SQL SELECT query.
    >
    > The MFC CDatabase and CRecordset classes give you convenient tools for
    > manipulating collections of SQL tables.


    Ok. I will try.

    Thanks
    AHR



  6. Re: MFC and MS Access

    > On Sun, 22 Aug 2004 19:31:32 +0200, "AHR" wrote:
    > If you are referring to MS Access as a real database. Forget it, this
    > atrocity of a database is not even thread safe, provides no record
    > locking.
    > For real databases use Firebird, MySQL, PostgreSQL, SleepyCat or the
    > Humongous SAP
    > Unless you are using this database on a single machine and never write
    > to the database in any other thread than one you are going to have
    > database corruption and/or overwrites.
    >


    LOOOOOOOL. I really hate this. I ask a question about how to communicate
    with Access, and get an answer about something else. If you take a look at
    my question, the word real is in question marks ("real").

    AHR



  7. Re: MFC and MS Access

    In article <412b3e67$0$213$edfadb0f@dread14.news.tele.dk>,
    "AHR" wrote:

    I wrote:
    > > The MFC CDatabase and CRecordset classes give you convenient tools for
    > > manipulating collections of SQL tables.

    >
    > Ok. I will try.


    Microsoft provides plenty of examples. Start with "Enroll" or "Creating
    a Database Application"

  8. Re: MFC and MS Access

    That is what ODBC is for. It makes the database transparent to you. Look into
    ODBC and you will find out how.

    "AHR" wrote in message news:<412b3f8d$0$213$edfadb0f@dread14.news.tele.dk>...
    > LOOOOOOOL. I really hate this. I ask a question about how to communicate
    > with Access, and get an answer about something else. If you take a look at
    > my question, the word real is in question marks ("real").
    >
    > AHR


+ Reply to Thread