Can't fill datagrid?

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

I have the following code in VS Studio .NET 2005 beta:

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

End Sub

Where a database connection has been made during design time and I can
preview data. The above line gives a "specified method is not supported
error" on the Me.DataAdapter1.Fill(DataSet1) line. The adapter should fill
from the dataset. I've seen many examples exactly like the one above but
can never get mine to go.

Any suggestions?

Thanks,
Brett
 
Jan. 13, 2005

Are you sure that the examples you have seen are for 2005? I know this
is how you do it for 2003. The error you got reminds me of SOAP headers when
you want a header required, it says that property is no longer supported.
This was because Microsoft got rid of that property in 2003, but never
removed it from the program. I have never used VS 2005 so I'm just guessing.
I wish you luck! :)


Joseph MCAD
 
I've taken that line out and replaced it with InitializeComponents(), which
was created automatically when I added the datasource, dataconnection, and
dataadapter components. I've assigned the Datagrid.datasource to the
dataconnector I've created and selected the one table in it. When I run the
app, I get an error that the DataMember Property "tablename" was not found
in the datasource.

I can preview data and don't understand why the datagrid has so many
problems. I'd like any comments from people using VS 2005 that have
successfully made their datagrids bring in data from a database.

Thanks,
Brett
 
Back
Top