NAME

class.aspdb_sql.asp - v1.0.0 - PHPLIB's DB_Sql format in ASP language


SYNOPSIS

<!-- #include file="class.aspdb_sql.asp" -->
<%
	var dbs = new DB_Sql( );
	dbs.dsn( "DSN=project;UID=root;PWD=manager" );

	dbs.query( "SELECT * FROM BOOKS" );
	while ( dbs.next_record() ) {
		Response.Write( dbs.f("BOOK_TITLE") + "\n" );
	}
%>


DESCRIPTION

class.aspdb_sql.asp permits using DB_Sql format (PHPLIB) in ASP language.


METHODS


DB_Sql( [$dsn_string] )

Constructor. When creating an instance, you may optionally supply a DSN connect string


dsn( $dsn_string )

Connecting to database using DSN connect string.


query( $query_string )

query_string is a SQL statement that is sent to the database.
If the query is syntactically incorrect (no valid result id is being produced), halt() is called with a meaningful error message.


next_record( )

The method next_record() advances the cursor through the current query result and updates the Record and Row instance variables


num_rows( ), nf( )

The method num_rows() returns the number of rows returned by the current SELECT query.


affected_rows( )

This method is under construction. Not implemented yet.


num_fields( )

The method num_fields() returns the number of columns returned by the current query.


np( )

The method np() prints the number of rows returned by the current query.


f( $field )

Returns the variable Record[$field].


p( $field )

Prints the variable Record[$field].


seek( [$pos] )

The method seek() positions the Row pointer within the result set. Useful for reading the same result set twice or otherwise jumping around within the result. $pos is not checked in any way for validity.


metadata( )

This method is under construction. Not implemented yet.


close( )

Free memory and close ADODB.recordset and ADODB.connection.


INTERNAL METHODS


connect( )

Used internally to generate a Link_ID, if necessary.


halt( $msg )

Used by query() if the initial database connection cannot be made or the target database does not exist.


debug( )

Used internally by debuging.


DOCUMENTATION

You're reading it.


VERSION

class.aspdb_sql.asp 1.0.0 - Aug 11, 2002 © RFK Solutions <rfksolutions@users.sourceforge.net>


AUTHOR

CopyRight (c) 2002 RFK Solutions, rfksolutions@users.sourceforge.net. All Rights Reserved.

The latest version of this class should be available from the following locations:
http://rfkmap.sourceforge.net

This program is free software; you can redistribute it and/or modify it under the GNU General Artistic License, with the following stipulations;

Changes or modifications must retain these Copyright statements. Changes or modifications must be submitted to the author.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Artistic License for more details. This software is distributed AS-IS.

Address Bug Reports or Comments to RFK Solutions, rfksolutions@users.sourceforge.net.

ADODB_SQL Library for PHP4
http://rfkmap.sourceforge.net/download/adodb-sql.html

PHP Base Library
Release phplib_7_2 (c) 2000-2001 Boris Erdmann (boris@erdmann.com), Kristian Köhntopp (kk@netuse.de) and Sascha Schumann (sascha@schumann.cx)
http://phplib.netuse.de/