Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Best Way to Update a SQL Server DB
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Best Way to Update a SQL Server DB

 Post Reply Post Reply
Author
ChubbyArse View Drop Down
Newbie
Newbie
Avatar

Joined: 24 March 2003
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ChubbyArse Quote  Post ReplyReply Direct Link To This Post Topic: Best Way to Update a SQL Server DB
    Posted: 24 March 2003 at 5:09am
Hi all,

I would like to know what the consensus of opinion is regarding the best
method to employ to update a SQL Server database from an ASP page.
The mitigating factors are that there will be many people updating and add
new records throughout the day, and many people running reports using
crystal webreports.

From where I'm standing there are the following options:

1. Open an ADO recordset based on the table and update the fields of either
a new record, or an existing record.
2. Use a UPDATE or INSERT INTO SQL string.
3. Use stored procedure and an ADO command object.

What is the best option in terms of locking, do Stored procedure insert and
update quicker than using a recordset?
I'm basically looking for the most robust and secure method to update a
database.

Cheers
Alex
Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamewave Quote  Post ReplyReply Direct Link To This Post Posted: 24 March 2003 at 5:19pm
From my experience stored procedures are the fastest way of accessing/modifying/creating data in an SQL server. As far as security goes, I don't know of any advantages/disadvantages in any of the three methoods you described that aren't the same for each one.
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2003 at 12:51am
Number 3 is also more secure. You can apply object permissions to the Stored Procedure, limit SQL injection through parameters, etc.
There have been many, many posts made throughout the world...
This was one of them.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.