Can't fill datagrid?

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
 
G

Guest

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
 
B

Brett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top