473,756 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't fill datagrid?

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

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) 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 1634

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(ByVa l sender As System.Object, ByVal e As
System.EventArg s) 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 InitializeCompo nents(), which
was created automatically when I added the datasource, dataconnection, and
dataadapter components. I've assigned the Datagrid.dataso urce 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********@dis cussions.micros oft.com> wrote in message
news:14******** *************** ***********@mic rosoft.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(ByVa l sender As System.Object, ByVal e As
System.EventArg s) 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
339
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 Select the appropriate data. I then use a OleDbDataAdapater to Fill a DataSet object. My problem is that I can't seem to show the results of the query on my datagrid object. Here is Code private void btnSearch_Click(object sender,...
1
1689
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 data can't be paged when using AllowPaging=true, and it displayed a page using AllowCustomPaging=true,but still can't be paged. Is that if i want to page the records, I can't use oledbdatareader as datasource ?
2
1273
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 Query Analyzer, but when I run it from my web page I kept getting a TimeOut exception. So then, as an experiment, I changed the way I created the adapter to the following: SqlConnection conn = new SqlConnection(m_Conn); SqlCommand sqlCommand =...
6
1746
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 DNS error. I developed this "simple" page but so far it is not simple! argh! <%@ Page Language="VB" Debug="true" Explicit="true" %> <%@ import Namespace="System.Data" %>
5
1913
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
1463
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 question I have is: if I allow the user to sort the datagrid by clicking on the column header, is there any way that I can tell which column the datagrid is sorted on, so that I can sort the data in the crystal report the same way?
1
7117
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 fill dataset(ds) da.selectcommand.commandtext="select * from xxx" da.fill(ds.tables(0)) and when i write
3
1193
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 me.where i m wrong.. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq;
3
2033
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 any databe connection just fill the datagrid throgh textbox.text value thank u
0
9255
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9844
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8688
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7226
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6514
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5289
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.