Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 23rd, 2005, 08:06 PM
Registered User
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default trying to load db data into data grid

Hi everyone, I am new so

(Visual Basic) I am having a problem loading data into data grid on my form in Visual Studio from an Access db. Here is the line of code:

   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

When I try to run it I get:

 An unhandled exception of type 'system.Data.OleDb.OleDbException
occured in system.data.dll

That last line of code is highlighted in debug mode

I've got my connection, adapter, and dataset.i have tested my connection and it works. I have set the data source and data members correctly to my ds. When I go to Preview Data, then click fill data set, it works fine. Just won't load to form. Tried using a button instead but still nothing. I am pretty positive that my steps to connect are right.

Could it have something to do with the MSDE? I can't so much locate it on my machine. I thought I had it but after looking, couldn't find it, so I downloaded it from microsoft. But still no luck. I bet it is something easy, but I have spent sooooo many hours trying to figure it out

Quick replies are so very much appreciated. Thanks sooooooooooo much


Old May 24th, 2005, 08:59 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi

Hi there.. i dont have a clue about your problem.. everything looks ok.. but you are in the wrong forum.. try reposting in the .net forum!


Old June 7th, 2005, 12:05 PM
Friend of Wrox
Join Date: Jun 2005
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts


what you need to do is have a data control on the page and have all that linked up and then put a msFlexGrid on the page and make shore that the recordset is set to see the data control this will work garunteed if it is still wrong then i'll give you the vb project

I hope it goes well,

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to update data to DB from data set umank.88 ADO.NET 1 May 7th, 2008 10:07 PM
How to sort data in a data grid? zaheerabbas.sk ASP.NET 1.0 and 1.1 Basics 3 April 10th, 2007 02:37 PM
Export data from data grid to excel pomoc VB.NET 2002/2003 Basics 0 December 16th, 2005 03:11 PM
Export data from data grid to Excel pomoc Visual Basic 2005 Basics 0 December 16th, 2005 02:56 PM
Data Grid nishanizam ASP.NET 1.x and 2.0 Application Design 0 May 27th, 2004 03:20 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.