473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Can't fill datagrid?

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
Nov 21 '05 #1
2 1611

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
"Brett" wrote:
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

Nov 21 '05 #2
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

"Joseph MCAD" <Jo********@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...

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
"Brett" wrote:
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

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ed_P. | last post by:
Hello I have a Windows Form that I am trying to use to display data in a DataGrid object from an Access Database. I have created an OleDbCommand Object (with the appropriate Connection string) to...
1
by: Yangtsi River | last post by:
Hi, I am retrive record from an Access database and want them displayed page by page, I used oledbdatareader to retrive and assigned the datasource of datagrid control to this reader. but the...
2
by: Dan | last post by:
I've created a web form which fills a DataGrid with a DataSet generated from the SqlDataAdapter.Fill method. The adapter's query takes about 30 seconds to complete when I run it in the SQL Server...
6
by: Teep | last post by:
Below is my code for dropdownlist that is populated from a SQL table. After a selection from the ddl, a datagrid is suppose to come up pertaining to the information selected, but I keep getting a...
5
by: Just Me | last post by:
Given a button name Btn_5 and Index=5 I want to do something like dim zz as string = Btn_??Index??.Text or given an array of buttons, do:
1
by: Jim | last post by:
Hello, I am creating a windows form application using vb.net 2003 which displays data in a datagrid, and then, if the user wants, I produce a nicely formatted crystal report of the data. The...
1
by: Mrozu | last post by:
Hi I need execute SELECT SQL query in DataSet. No in SQL server(da.selectcommand) and fill dataset, only show in datagrid filtered by select-where query records from dataset:) For example I...
3
by: monika varshney | last post by:
I have a sql server table and i want to read it in the datagrid view of C# .Net. I think it is easy to do it. but i m not able to show any output in the datagrid... here is my code.please guide...
3
by: Rushi Panchal | last post by:
Hiii I have a one textbox ,one button,one datagridm i want to fill datagrid anything type in textbox and press button than whatever value in text box is going to datagrid and so on and i don't use...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.