[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Update command in SQLDataSource

Posted on 2011-02-23
2
Medium Priority
?
268 Views
Last Modified: 2012-05-11
Hello all,

I am using SQL dsatasource  to bind the grid view. Now I am trying to eable update in the datagrid. The way I want is that of somebody updates the value in the Grid then it should be reflected in the database in the back.

I have some simple  query like

update X
set Column1 = @NewvalueColumn1
where
oldvalueColumn2= 'something'

Now here, where do I specify @NewvalueColumn1? Because that is somevalue coming from the Grid. How do I read that value?
0
Comment
Question by:TheCommunicator
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
rajeevnandanmishra earned 2000 total points
ID: 34967426
Hi,

<<<
update X
set Column1 = @NewvalueColumn1
where
oldvalueColumn2= 'something' >>>
Are you able to get the value of "oldvalueColumn2"?
Normally if you bind the grid with a datasource, then you can make it enable for updates by setting the grid properties. Which grid you are using?

The "@NewvalueColumn1" can only be found from the current row of the Grid.

Please provide a little more detail and i hope soon you will get the solution.





0
 

Author Comment

by:TheCommunicator
ID: 34974158
I am using ASP Grid control.

That's what my question is thatwhen you say "The "@NewvalueColumn1" can only be found from the current row of the Grid."

How can I read the current row in Datagrid?

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question