Re: Need help in VB.NET connecting to Access database



Terry wrote:
>Are you using Visual Studio .net to create the application? If so can
>you connect to the MDB via the server explorer?
>
>Add a new DB connecion. Then click to the provider tab change the
>provier to MS Jet 4.0 OLE DB PRovider, then back to the Connection tab.
>Pick your DB and test it.

I've tried also using the Data Form Wizard to create my form. I'm able to
create the data connection using Server Explorer no problem. I used MS Jet 4.
0 OLE DB Provider and tested the connection with no problem. I've just put a
data grid on the form with two buttons called Load Data and Save Data.

The "Load Data" button has the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.
EventArgs) Handles Button1.Click
DataSet11.Clear()
OleDbDataAdapter1.Fill(DataSet11)
End Sub

The "Save Data" button has the following code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.
EventArgs) Handles Button2.Click
OleDbDataAdapter1.Update(DataSet11)
End Sub

Everything else are defaults and I'm still getting the stupid Exception error
message. Is there something possibly that wasn't installed when I installed
VB.NET 2003, perhaps as part of a Custom installation that may be missing? I
would think it would be simple to load an Access database, but am having no
luck.


--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vb-net/200508/1
.