Update or Databinding?

G

Guest

Hi,

There seem to be several ways to update rows in sql. What is the best
practice? I have written a medium sized update statement into a stored
procedure, taking values from the web text controls, drop down lists etc. It
works, but i have also been reading on databinding fields to a datasource and
setting form control autopostback to true. I now am worried I have not
implemented a very good way to post back to sql. Is what I have done wrong or
are both ways acceptable?
 
G

Guest

Both ways are acceptable, and I use your way. The databinding/
DataAdapter.??? ways are controllled by ASP.Net. In my update statements I
check the UPDATE_DT column to make sure an update is not writing over another
update. Keep doing it your way.

HTH
 
G

Guest

Thanks. I have discovered the wonderful (!) world of asp field validators and
so i can be a bit more sure that the update statement will work. Just seems
that with databinding there must be a cleaner way because I do a sql command
to GET the values into the controls then another one to UPDATE the values,
just seems overkill, but i dont know enough about databinding yet.. thanks
for the confidence boost though!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top