none
Datagridview does not show data at run time in VB Express 2008 in Windows 7

    Question

  • I'm using Visual Basic Express 2008 in Windows 7(64-Bit). I've added a datasource to my project and dragged a table from Data Sources onto my form. It automatically created a DataViewGrid and placed this statement in my form load event: Me.BillsTableAdapter.Fill(Me.DoBills_2009DataSet.Bills). The DataGridView shows all the correct fields/columns. The .DataSource property for the DataGridView is set to the automatically created BillsBindingSource. When I preview the BillsTableAdapter, the data appears. But data does not appear when I run the app. The datagridview is empty. When I build the app and run the executable, I get a Microsoft .NET Framework error message that says: "Unhandled exception has occurred in your application.  If you click continue, the application will ignore this error and attempt to continue.  If you click Quit, the applicaiton will close immediately. The 'Microsoft .ACE.OELDB.12.0' provider is not registered on the local machine."  If I click "Continue" I get my form with an empty DataGridView.  What am I missing to get the data to display in the grid at run time? Oh, and I've also tried using the DataGridView in C# and I get the same problem.
    Friday, December 11, 2009 7:42 PM

Answers

  • The following erorr:

    The 'Microsoft .ACE.OELDB.12.0' provider is not registered on the local machine

    suggests me to believe that you are compiling for 64bit

    I dont have express edition but are following steps valid in 2008 express?

    http://forums.xna.com/forums/t/4377.aspx#22601



    Arjun Paudel
    • Marked as answer by Rev.Ed Saturday, December 12, 2009 1:30 PM
    Saturday, December 12, 2009 4:22 AM
  • That's it!  Thanks Arjun Paudel for the link.  Here's the solution as found on XNA Creator's Club Online.  It's by Stephen Styrchak. 

    In VC# Express, this property is missing, but you can still create an x86 configuration if you know where to look.

    It looks like a long list of steps, but once you know where these things are it's a lot easier. Anyone who only has VC# Express will probably find this useful. Once you know about Configuration Manager, it'll be much more intuitive the next time.

    1. In VC# Express 2005, go to Tools -> Options.
    2. In the bottom-left corner of the Options dialog, check the box that says, "Show all settings".
    3. In the tree-view on the left hand side, select "Projects and Solutions".
    4. In the options on the right, check the box that says, "Show advanced build configuraions."
    5. Click OK.
    6. Go to Build -> Configuration Manager...
    7. In the Platform column next to your project, click the combobox and select "<New...>".
    8. In the "New platform" setting, choose "x86".
    9. Click OK.
    10. Click Close.

    There, now you have an x86 configuration! Easy as pie! :-)

    I also recommend using Configuration Manager to delete the Any CPU platform. You really don't want that if you ever have depedencies on 32-bit native DLLs (even indirect dependencies).

     

    Stephen Styrchak | XNA Game Studio Developer
    • Marked as answer by Rev.Ed Saturday, December 12, 2009 1:33 PM
    Saturday, December 12, 2009 1:33 PM

All replies

  • I did some research for you try it if does not solve your problem let me know, you have to change your 64 to 86....

    http://stackoverflow.com/questions/238625/vb-net-error-microsoft-ace-oledb-12-0-provider-is-not-registered-resolved

    http://social.msdn.microsoft.com/forums/en-US/vsto/thread/43d6b544-7172-4fe7-babf-a541e5f6a1c9/

    Don't judge me, just Upgrade me. Thanks!
    Friday, December 11, 2009 10:59 PM
  • Thanks Malange.  I appreciate your research and help.  I followed each link you provided.  Sadly on the first one, I could not find in the advanced compiler configuration options of my project properties where to change to x86.  Actually, I couldn't find where to change to x86 anywhere.  On the second link, I downloaded and installed the Microsoft Office Access database engine, but it didn't fix either the empty grid or the run time error.  But again, I really appreciate your efforts.  If you have any other ideas, please share them.
    Saturday, December 12, 2009 2:21 AM
  • The following erorr:

    The 'Microsoft .ACE.OELDB.12.0' provider is not registered on the local machine

    suggests me to believe that you are compiling for 64bit

    I dont have express edition but are following steps valid in 2008 express?

    http://forums.xna.com/forums/t/4377.aspx#22601



    Arjun Paudel
    • Marked as answer by Rev.Ed Saturday, December 12, 2009 1:30 PM
    Saturday, December 12, 2009 4:22 AM
  • That's it!  Thanks Arjun Paudel for the link.  Here's the solution as found on XNA Creator's Club Online.  It's by Stephen Styrchak. 

    In VC# Express, this property is missing, but you can still create an x86 configuration if you know where to look.

    It looks like a long list of steps, but once you know where these things are it's a lot easier. Anyone who only has VC# Express will probably find this useful. Once you know about Configuration Manager, it'll be much more intuitive the next time.

    1. In VC# Express 2005, go to Tools -> Options.
    2. In the bottom-left corner of the Options dialog, check the box that says, "Show all settings".
    3. In the tree-view on the left hand side, select "Projects and Solutions".
    4. In the options on the right, check the box that says, "Show advanced build configuraions."
    5. Click OK.
    6. Go to Build -> Configuration Manager...
    7. In the Platform column next to your project, click the combobox and select "<New...>".
    8. In the "New platform" setting, choose "x86".
    9. Click OK.
    10. Click Close.

    There, now you have an x86 configuration! Easy as pie! :-)

    I also recommend using Configuration Manager to delete the Any CPU platform. You really don't want that if you ever have depedencies on 32-bit native DLLs (even indirect dependencies).

     

    Stephen Styrchak | XNA Game Studio Developer
    • Marked as answer by Rev.Ed Saturday, December 12, 2009 1:33 PM
    Saturday, December 12, 2009 1:33 PM
  • I had the exact opposite matter: got a new windows 7 x64 machine, with office 2010 x64 and was loading sources I developed on a 32 bit machine (windows 7) with office 2010 x32.

    the DAL was in a dll,and on running test it coplained Ace.12 was not registered on machine.

    The solution was: make all to AnyCpu. Point of interest: I had to made it more than once as every single project of solution (5 in all) , despite configuration manager settings, switched at least once to x86 settings during compilation.


    Cesare
    Wednesday, April 13, 2011 8:48 PM
  • After installing VB Express 2010, I found that my project converted perfectly, but the grids were again not displaying my data.  When I tried to follow this solution, I found that I could not because there was no Build on the menu bar; thus I could not get to Build -> Configuration.  To solve this new problem, you have to go to Tools -> Settings and select Expert Settings, and the Build will then appear in the menu again.  After that, follow the rest of the solution and it works.
    Rev.Ed
    Monday, April 18, 2011 1:33 PM
  • That's it!  Thanks Arjun Paudel for the link.  Here's the solution as found on XNA Creator's Club Online.  It's by Stephen Styrchak. 

    In VC# Express, this property is missing, but you can still create an x86 configuration if you know where to look.

    It looks like a long list of steps, but once you know where these things are it's a lot easier. Anyone who only has VC# Express will probably find this useful. Once you know about Configuration Manager, it'll be much more intuitive the next time.

    1. In VC# Express 2005, go to Tools -> Options.
    2. In the bottom-left corner of the Options dialog, check the box that says, "Show all settings".
    3. In the tree-view on the left hand side, select "Projects and Solutions".
    4. In the options on the right, check the box that says, "Show advanced build configuraions."
    5. Click OK.
    6. Go to Build -> Configuration Manager...
    7. In the Platform column next to your project, click the combobox and select "<New...>".
    8. In the "New platform" setting, choose "x86".
    9. Click OK.
    10. Click Close.

    There, now you have an x86 configuration! Easy as pie! :-)

    I also recommend using Configuration Manager to delete the Any CPU platform. You really don't want that if you ever have depedencies on 32-bit native DLLs (even indirect dependencies).

     

    Stephen Styrchak | XNA Game Studio Developer

    thanks very much it's very brilliant solution,and it works for me, thanks again
    Monday, June 13, 2011 6:53 PM