How to make an efficient ASP database operation program
Source: Internet
Author: User
<!--
Frog Frog recommended: How to do an efficient ASP database operating procedures
In general, we do ASP database programs are ado+access, and are using some query string plus recordset to manipulate the database, up to only the use of connection and recordset two objects and their several commonly used properties and methods, In fact, the use of ADO is far more than that, we have command objects and parameters objects are not used, and these two objects will improve your entire ASP program performance.
I've written a lyrics management program that uses SQL Server databases and stored procedures, (no parameterized queries, just to demonstrate ADO's use of SQL Server and stored procedures).
I hope you can learn something new from my sample code, hehe.
Note: I replaced the ASP boundary character in the sample code (that is, the one with the bracket with a percent sign) to the angle bracket in full-width Chinese, because many forums will filter the symbol, and then you copy the PostScript to replace it with the English half corner.
-->
<!--database Script-->
<!--Create a new database in SQL Server song and then select the database in Query Analyzer, assign the following T-SQL code to execute a batch query, and finally place the page in a virtual directory, and modify the database connection string into a string that fits your database configuration. You can run this page-->
<!--
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ Check_song] and OBJECTPROPERTY (ID, N ' isprocedure ') = 1)
drop procedure [dbo]. [Check_song]
Go
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ Insert_song] and OBJECTPROPERTY (ID, N ' isprocedure ') = 1)
drop procedure [dbo]. [Insert_song]
Go
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ P_song_list] and OBJECTPROPERTY (ID, N ' isprocedure ') = 1)
drop procedure [dbo]. [P_song_list]
Go
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ P_wawa_song] and OBJECTPROPERTY (ID, N ' isprocedure ') = 1)
drop procedure [dbo]. [P_wawa_song]
Go
if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ Wawa_song] and OBJECTPROPERTY (ID, N ' isusertable ') = 1)
drop table [dbo]. [Wawa_song]
Go
CREATE TABLE [dbo]. [Wawa_song] (
[SONG_ID] [INT] IDENTITY (1, 1) not NULL,
[Song_name] [Char] (COLLATE) chinese_prc_ci_as not NULL,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.