Problem with oleDbDataAdapter and MS Access Database
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Problem with oleDbDataAdapter and MS Access Database

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Problem with oleDbDataAdapter and MS Access Database

    hi,
    I have a problem regards with the using of oleDbDataAdpter in a Windows application form.

    I need to create a simple application that reads the data from a MS Access Table and populates a comboBox.

    I insert in my Form an oleDbDataAdpter and I create the connection and the query with the wizard.
    I also insert in my form a dataset.


    In the code, in the form_load event, I fill a dataset using the following instruction:

    this->oleDbDataAdapter1->Fill(this->dataSet1,"Abbonamenti");

    My problems are:
    - I used the oledbDataAdapter correctly?
    - How can I check if the dataset contains the correct data?

    Thank you for the helpfulness.

    Daniele.

  2. #2
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,059

    Re: Problem with oleDbDataAdapter and MS Access Database

    [ Moved thread ]
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  3. #3
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,594

    Re: Problem with oleDbDataAdapter and MS Access Database

    Quote Originally Posted by daniele.rolfo View Post
    In the code, in the form_load event, I fill a dataset using the following instruction:

    this->oleDbDataAdapter1->Fill(this->dataSet1,"Abbonamenti");

    My problems are:
    - I used the oledbDataAdapter correctly?
    - How can I check if the dataset contains the correct data?
    To be honest: I don't have the slightest idea! How should I or anyone else know from the practically no information you provided? We need much more concrete information and in particular more concrete code than just a single line.

    For starters, here's a thread that (AFAICT from what I know by now) is topically related and perhaps already provides some inspiration: http://www.codeguru.com/forum/showthread.php?t=508025

    And please use code tags when posting code to preserve proper code formatting. Not using them was harmless with your one-liner, but the initial post of the thread I linked to perfectly demonstrates how bad it can get without them.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center