473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Update or Databinding?

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?
Nov 18 '05 #1
2 1331
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

"louise raisbeck" wrote:
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?

Nov 18 '05 #2
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!

"MikeL" wrote:
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

"louise raisbeck" wrote:
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?

Nov 18 '05 #3

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

Similar topics

9
by: Pam Ammond | last post by:
I need the code to update the database when Save is clicked and a text field has changed. This should be very easy since I used Microsoft's wizards for the OleDBAdapter and OleDBConnection, and...
0
by: Patrick B | last post by:
I'm wondering about the mechanics of databinding. Say that a textbox is bound to a property of a business object. The business object is a "Person". The control is a textbox called...
0
by: doronb | last post by:
hello my question is : i define dynamic columns to datagrid , 4 columns are databound and 1 columne is "edit template column" and only this col editable , i define function for update when...
0
by: Coco | last post by:
Hi, who knows how to update the 'child' textboxes in a datarelated situation if the child records "doesn't yet exitsts/are still empty"? The problem can be explained with the Northwind database....
5
by: Stephen Plotnick | last post by:
I'm very new to VB.NET 2003 Here is what I have accomplished: MainSelectForm - Selects an item In a public class I pass a DataViewRow to ItemInformation1 Form ItemInformation2 Form
3
by: Brad Baker | last post by:
I have a formview with a datasource that contains a select and update command. The select statement works fine but the update command doesn't seem to be working. After some troubleshooting I have...
1
by: Larry Bud | last post by:
I added another column to a table, a varchar(1000), added a textbox to the formview, bound it (2 way), added the parameter to the update, but it won't update. I ran SQL Profiler, and the...
5
by: cmrchs | last post by:
Hi, I'm trying out Databinding to a Data Acces Layer using a ObjectDataSource-control The Update works fine but the Delete-method doesn't. when debugging I see that my productID-parameter is...
0
by: cmrchs | last post by:
Hi, I'm trying out Databinding to a Data Acces Layer using a GridView and ObjectDataSource-control The Update works fine but the Delete-method doesn't ??? <asp:GridView ID="GridView1"...
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,...
1
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.