I have a table with data on our SQL2000 server. I have created a project in VB.NET. I can successfully establish the SqlConnection1, SqlDataAdapter1, and DataSet11. I can preview the data. I then put a DataGrid on the form and connect the DataSource and the proper field headers appear. I then added a "load data" button with the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
DataSet11.Clear()
SqlDataAdapter1.Fill(DataSet11, "customers"
When I run the application and click on the "Load data" button I receive:
An unhandled exception of type
'System.Data.SqlClient.SqlException' occurred in system.data.dll.
This has happened with the table/data I created as well as an example with the Northwind database that is on the SQL server.
When I've done the exact same thing with a dummy database I created in Access97 on my hard drive I do not get this error so I assume it is a problem with my connection to the SQL server (?).
Thank you for whatever help you can give.
Deb
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
DataSet11.Clear()
SqlDataAdapter1.Fill(DataSet11, "customers"
When I run the application and click on the "Load data" button I receive:
An unhandled exception of type
'System.Data.SqlClient.SqlException' occurred in system.data.dll.
This has happened with the table/data I created as well as an example with the Northwind database that is on the SQL server.
When I've done the exact same thing with a dummy database I created in Access97 on my hard drive I do not get this error so I assume it is a problem with my connection to the SQL server (?).
Thank you for whatever help you can give.
Deb