aar0n
Member
Hi,
I'm new here. I'm not new to programming, but I am fairly new to .NET development. I'm learning .NET on the job and taking MS courses. I hope I'm posting this in the right place.
My attempts at creating a simple dataset using the data adapter's .Fill method is failing, as I'm getting "Invalid Object Name" although my table "SUBDIVISIONS" does exist (in my "PROPERTIES" SQL Server database).
Here is the code I'm having the problem with. I have verified my connection string, so my issue must be somewhere else. I must be missing something small but vital.
Any help would be greatly appreciated....here's the code....
I'm new here. I'm not new to programming, but I am fairly new to .NET development. I'm learning .NET on the job and taking MS courses. I hope I'm posting this in the right place.
My attempts at creating a simple dataset using the data adapter's .Fill method is failing, as I'm getting "Invalid Object Name" although my table "SUBDIVISIONS" does exist (in my "PROPERTIES" SQL Server database).
Here is the code I'm having the problem with. I have verified my connection string, so my issue must be somewhere else. I must be missing something small but vital.
Any help would be greatly appreciated....here's the code....
VB.NET:
Public Class Form1
Dim conn As New SqlClient.SqlConnection("Data Source=AARON;Initial Catalog=Properties;Integrated Security=True")
Dim da As New SqlClient.SqlDataAdapter("SELECT * FROM SUBDIVISIONS", conn)
Dim DS As New DataSet
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
da.Fill(DS, "SUBDIVISIONS") 'ERROR OCCURS HERE
End Sub
End Class
Last edited by a moderator: