NCS Logo - Click for home page Northstar Developer Center
Platforms
All Platforms
.NET Framework (1.x - 4.x)
Active Server Pages
ASP.NET
C#
SQL Server
VB.NET
Visual Basic

Keywords
.NET Data Types
.NET E-mail
.NET Events
.NET Functions
.NET Object Programming
.NET System.Configuration
.NET System.Diagnostics
.NET System.IO
.NET System.Net
.NET System.Net.Sockets
Active Data Objects
ASP Architecture
ASP Black Belt
ASP Built-in Functions
ASP Built-in Objects
ASP Debugging
ASP Performance
ASP Security
ASP Syntax
ASP.NET Authentication
ASP.NET Controls
ASP.NET Data Access
ASP.NET Features
ASP.NET Master Pages
ASP.NET Page Events
ASP.NET Security
ASP.NET ViewState
Atom
Certifications
COM, DCOM, COM+
Data Access
E-Mail
Errors
Exporting Data
HTML Tips
IIS
Object-Oriented Programming
RSS
SQL
Uncategorized ASP Tips
VB API Programming
VB Forms
VB Syntax
XML

Book Support
Visual Basic 6 Bible
ASP Bible
ASP Weekend Crash Course
ASP.NET At Work
Creating Web Services

Updating Databases

Written by Eric Smith, Northstar Computer Systems LLC

If you're writing applications to update your database with either new or modified records, you've got several options with ADO. You can create a dynamic recordset, which allows you to add new records or update existing ones. You can also create SQL statements to perform inserts, updates, and deletes and use the Execute method of the Connection object to fire them off. You can also create stored procedures with parameters and use them with the Command object.

The fastest way to run your SQL is through stored procedures. All of the SQL statements can benefit by being saved as stored procedures. Saving the stored procedure also saves the execution plan, which for inserts and updates, includes how to update any indexes related to the tables.

If you don't have the ability to create stored procedures, executing SQL statements is the next fastest way to make this work. The system does have to create the execution plan on the fly; however, it doesn't take nearly as long as opening a dynamic recordset and making updates to it.

Keywords: [ Uncategorized ASP Tips ]

Publication Date: 7/1/2000