ASP Nuke
>
Member Login
Username
Password

Don't have an account yet, register now it's free!
I forgot my password


Article Search

Message Forums
ASP Nuke  (221/420)
ASP Development  (19/25)
SQL Server Development  (5/12)

Suggestion Box

Have a suggestion on how we can improve this application?

Please send us your suggestions, we would love to hear what you have to say!


Help ASP Nuke

Help support "ASP Nuke" and free software by donating now


Task List

ASP Nuke Tasks:


ADO Library

Orvado Technologies

Introduction

The ADO library handles all of the database calls the website makes using library functions. The only two methods you should ever use from this library are adoExecute and adoOpenRecordset. These two methods execute a statement or procedure. adoOpenRecordset will return an ADODB.Recordset object whereas the other does not.

This file is included in site_lib.asp which, conversely, is included on nearly every page on the site since database calls are needed on nearly every page. The library encapsulates the minutia of creating ADODB objects and opening a database connection so all you need to worry about is writing proper SQL queries and passing the right parameters to your stored procedures.

The connection string for the database is stored in the global.asa file at the root of your web server. This is the only place the database string is stored. The library will read the connection string and use this to make new connections to the database server.

adoRecordsetErrors (sub)

Displays all of the errors in the Errors collection of the recordset. This function is called automtically when opening a recordset via the adoOpenRecordset method creates an error.

For Internal Use Only

adoConnect (sub)

Opens a new connection to the database (configured in global.asa) unless a connection has already been opened. No need to do pooling since that is handled by IIS internally.

For Internal Use Only

adoExecute (sub)

Executes a query without returning a recordset. This method will return a number indicating the number of rows that were affected by the query.

Parameters

sStat
Transact-SQL statement to be run by the database server.

Returns

Nothing

adoOpenRecordset (function)

Opens a forward-only recordset from the database using the supplied query (sQuery).

Parameters

sStat
Transact-SQL statement to be run by the database server.

Returns

ADODB.Recordset object containing the results of the SQL statement.

adoDisconnect (sub)

Disconnect from the database here

Parameters

None

Returns

Nothing

Summary

All of your database calls should go through the ado_lib.asp library. There is no reason to create your own database connection. By keeping all database calls using the same library, it will allow us to easily upgrade and improve the performance of ASP nuke as needed.

It will also allow us to write custom error handlers which will appropriately log any errors that occur due to our database calls. If you have a need to create a database connection on your own, you should have this approved before you complete your module, otherwise it may not be accepted as an approved ASP Nuke module.

Last Updated: Sep 29, 2003

FAQ

Web Links
Download
Sponsors

Poll

What's Your Favorite Browser?

Mozilla Firefox
Internet Explorer
Netscape
Safari
Opera
Other

View Results . Archive


Other Languages

Join the language translation project  to translate ASP Nuke into other languages


Hit Counter
Total page views since
Sept 19, 2003

694475

Valid CSS!
Valid HTML 4.01!

   I do not think much of a man who is not wiser today than he was yesterday. -- Abraham Lincoln   
© 2002 Orvado Technologies, All Rights Reserved - Site Map - CSS - HTML - 15.6250 msec