473,396 Members | 1,895 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,396 software developers and data experts.

Datagrid Update DB?

pnp
Hi all,
I have a datagrid that connects to a DataSource through ODBC and I can't
seem to make a datagrid cell update the database with the new value, when I
edit that cell... How can I do this?

Thanks in advance,
Peter
Nov 16 '05 #1
3 2206
Hi,

You'll have to use ado.net OdbcDataAdapter.Update method on source table.
You might read about ado.net and database access in .net help files...

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:e6**************@TK2MSFTNGP10.phx.gbl...
Hi all,
I have a datagrid that connects to a DataSource through ODBC and I can't seem to make a datagrid cell update the database with the new value, when I edit that cell... How can I do this?

Thanks in advance,
Peter

Nov 16 '05 #2
What kind of data source is it? Is it a Dataset? If its a Dataset then you have to manually get the changes from the datagrid and then update the Dataset. After you do this then use the adapter to call the update method with the Dataset.
Nov 16 '05 #3

"Tony Almazan" <al******@noa.nintendo.com> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
What kind of data source is it? Is it a Dataset? If its a Dataset then

you have to manually get the changes from the datagrid and then update the
Dataset.

Actually, you can just call Update directly on the underlying table(s)
calling
dataAdapter1.Update(ds.Tables[0])
dataAdapter2.Update(ds.Tables[1])

etc
After you do this then use the adapter to call the update method with the
Dataset.
Nov 16 '05 #4

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

Similar topics

4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
0
by: Richard Ryerson | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls (watch...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...

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.