473,588 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGridView1 (VS2005)

vbt
I am new to using the DataGridView and I have read most everything I can
find on this subject. But obviously I am not see the hole picture.

I am trying to update a data base using the DataGridView.

The DataGridView displays the data correctly when the program is run. I am
able to change the data in a cell but when I reload the data base the
changes were never updated.

DataGridView.Da taSource = GroupDataBindin gSource

DataGridView.Ed itMode = EditOnEnter

DataGridView.Co lumnsReadOnly = False

The following is the code I am using to save the data:

Private Sub SaveGroupData()

Try

Me.Validate()

Me.GroupDataBin dingSource.EndE dit()

'This line of code saves data into the
Group_DBDataSet .Group_Data' table.

Me.Group_DataTa bleAdapter.Upda te(Me.Group_DBD ataSet.Group_Da ta)

Catch ex As Exception

Dim msg As String

msg = " Sub SaveGroupData " & vbCrLf & vbCrLf

MsgBox(msg & ex.ToString) ' Show friendly error message.

Finally

End Try

End Sub

Any help will be appreicated
Nov 20 '06 #1
2 1283
On Sun, 19 Nov 2006 21:52:56 -0800, "vbt" <tb***@cwnet.co mwrote:
>I am new to using the DataGridView and I have read most everything I can
find on this subject. But obviously I am not see the hole picture.

I am trying to update a data base using the DataGridView.

The DataGridView displays the data correctly when the program is run. I am
able to change the data in a cell but when I reload the data base the
changes were never updated.

DataGridView.D ataSource = GroupDataBindin gSource

DataGridView.E ditMode = EditOnEnter

DataGridView.C olumnsReadOnly = False

The following is the code I am using to save the data:

Private Sub SaveGroupData()

Try

Me.Validate()

Me.GroupDataBin dingSource.EndE dit()

'This line of code saves data into the
Group_DBDataSe t.Group_Data' table.

Me.Group_DataTa bleAdapter.Upda te(Me.Group_DBD ataSet.Group_Da ta)

Catch ex As Exception

Dim msg As String

msg = " Sub SaveGroupData " & vbCrLf & vbCrLf

MsgBox(msg & ex.ToString) ' Show friendly error message.

Finally

End Try

End Sub

Any help will be appreicated
Running & reloading from where?

Try running and reloading from a release build and see what happens.

Gene
Nov 20 '06 #2
Hi,

If you see the database in the solution explorer make sure its copy
to output property is set to only if newer

Ken
--------------------------
"vbt" <tb***@cwnet.co mwrote in message
news:OM******** *****@TK2MSFTNG P03.phx.gbl...
>I am new to using the DataGridView and I have read most everything I can
find on this subject. But obviously I am not see the hole picture.

I am trying to update a data base using the DataGridView.

The DataGridView displays the data correctly when the program is run. I am
able to change the data in a cell but when I reload the data base the
changes were never updated.

DataGridView.Da taSource = GroupDataBindin gSource

DataGridView.Ed itMode = EditOnEnter

DataGridView.Co lumnsReadOnly = False

The following is the code I am using to save the data:

Private Sub SaveGroupData()

Try

Me.Validate()

Me.GroupDataBin dingSource.EndE dit()

'This line of code saves data into the
Group_DBDataSet .Group_Data' table.
Me.Group_DataTa bleAdapter.Upda te(Me.Group_DBD ataSet.Group_Da ta)

Catch ex As Exception

Dim msg As String

msg = " Sub SaveGroupData " & vbCrLf & vbCrLf

MsgBox(msg & ex.ToString) ' Show friendly error message.

Finally

End Try

End Sub

Any help will be appreicated

Nov 20 '06 #3

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

Similar topics

3
1789
by: Darrin | last post by:
Hello, I see that VS2005 and the new framework 2.0 is out to the public now. Wondering about some things. When you install the new framework 2.0 can a person still use visual studio 2003 or do you need to use Visual Studio 2005? If you can use the new framework 2.0 with VS2003 are there any benifits?
5
1985
by: GaryDean | last post by:
(my original post was inaccurate but this post accurately describes what I think is a very bad vs2005 bug) short description... Deleting a dataset and recreating it from the dataadapter causes VS.Net 2005 to render the associated .resx and .vb file inoperative. detail... I converted an asp 1.1 vb.net app using the vs2005 conversion wizard and then retested the app after conversion.
10
2518
by: musosdev | last post by:
Hi guys I'm trying to migrate to VS2005... I've managed to do that, but realised I'd opened my web projects as file projects, and I'm getting the error about network BIOS command limit. Anyway, I decided to have a go at loading them as web projects from our Win2k3 server. It gets so far and then says "The web server does not appear to have FrontPage server extensions installed".
6
3617
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a list of all of my webs, however if I attempt to open a site under and web other than localhost I receive the message: "Unable to open the Web 'http://localhost/anywebappname'. The Web 'http://localhost/anywebappname' does not exist" Obviously...
7
1701
by: Frank Rizzo | last post by:
Is it me or is the speed of VS2005 actually slower than VS2003? The startup is pretty bad - even though I changed VS to display an empty environment. When I create a new form and want to change its size: while I am resizing, an hour glass comes up for a few seconds. There a lot of other slowdowns all over the system. It seems like it the hard drive kicks in really hard. Now I did have the VS2005 beta installed, but I uninstalled it...
9
1975
by: yevvi | last post by:
Hi, We have a product with bunch of dlls which are now built with Visual Studio 2003. We want to switch the build to use VS2005. I have read that in VS2005 runtime libraries come as side-by-side assemblies and that application has to have a manifest binding it to those assemblies. My question is, can previously built apps use my new dlls build with vs2005? It would be really important to make it work, because otherwise we would...
15
4208
by: Joseph Geretz | last post by:
OK, I'll admit it up front - I just don't get it. Here's our previous VS2003 development model. Developers develop the WS solution on their own workstations, using their own IIS web servers mapped to the local devleopment folder. Project compiles to a subfolder .\bin. To deploy, the asmx page and bin subfolder are copied to the production server. So now I upgrade to VS2005. OK, so except for the name, everything is changed. No more...
5
3019
by: Gumby | last post by:
Hi there! A "special" project team in our department has decided to purchase XMLSpy. We standardize on VS2005 as our IDE and up to now everyone has used the XML parser in VS2005. Are there advantages to using XMLSpy over VS2005? Apparently there are "integration diagrams" that VS2005 does not have natively. Does someone have a link or a MVP have some comparison I could have? Warmly Adrian
1
2048
by: trint | last post by:
Hi, I have a dataGrid that when I try to add a row, I can't keep the data separated into columns. Here is what I tried to separate the columns (a coma): string completeProductsString = new string; DataGridViewRowCollection rows = this.dataGridView1.Rows; completeProductsString = productsString0 + "," + productsString1; rows.Add(completeProductsString);
1
1564
by: trint | last post by:
Hi, I have dataGridView1 with a DataSource (categoriesBindingSource). I didn't use the vs.net workbench to bind the second datagridview (dataGridView2). I used this code: bindingSource1.DataSource = GetData("Select id, parent_id, name FROM categories where parent_id = '" + dgData1 + "' and active = 1 order by sort_order asc"); dataGridView2.DataSource = bindingSource1;
0
7929
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8228
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8357
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
7987
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
8223
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
3847
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
3887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2372
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.