Update Database records ??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

I have a dataset object which as been filled from an SQL server table
I have then a dataview from that dataset,which is bind to a datagrid object.

My user can edit, update, delete entry directly from that datagrid through
an ASP page.

Is there a simple way to automatically handle a database object based on the
rowstate of the datagid ?

What I mean is that :
- if my user add an entry I should run a proper INSERT querry
- if my user Update an entry I should run a proper UPDATE querry
- if my user add an entry I should run a proper DELETE querry

Is there any self intelligent function which is able to read the status of
Rows and execute proper statement.

I could also use the GetChange function to build a new dataset and then
handle th select ..


Any tips

thnaks for your help
regards
serge
 
Unless you are not using binding at all (or have customized ASP.NET to look
just like ASP - a chore so many go through that makes life SO much harder),
when a person edits a row, you get a button to fire an event.

It is not automagic and you have to link the data back, but a DataAdapter
with proper SELECT, INSERT, UPDATE and DELETE commands can handle all of the
CRUD for you without much pain. Most of the work necessary is simple drag and
drop.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top