How to update only one row in database?
-
I am displaying the data in datagrid from a table, now there is a column of 'availableAmount'. Now the user can insert more amount. So how to get this top row get updated. -- modified at 1:34 Thursday 16th March, 2006
In datagrid set the column's readonly to true asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf -- modified at 3:25 Thursday 16th March, 2006
-
In datagrid set the column's readonly to true asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf -- modified at 3:25 Thursday 16th March, 2006
-
I think, I have made the question mix up. My question should be for SQL forum. Just forget about datagrid, and let me know, what might be the sql query for updating the top row in table sorted by date descending. Thanks for the reply.
you're mixing up your sql I think. Updating the row goes via an
UPDATE
statement. Ordering your table is impossible, you need to use aSELECT
statement (which will result in a view of the table, it isn't the table itself).UPDATE SET = VALUE WHERE
(don't forget the quotes if it is a string.SELECT < COLUMNS > FROM WHERE ORDER BY DESC
where < COLUMNS > is a kommaseperated list of the columns you want in your view or a * to select them all. This should be clear, if it isn't I suggest you learn sql first, your going to need it and this is basic stuff. Good luck! No hurries, no worries. -- modified at 4:04 Thursday 16th March, 2006