HomeCommunityControl GalleryData & XMLMaster-DetailAmbientware.Utils.DBUtils

Ambientware.Utils.DBUtils



(1) Submit a Review

1,622 Downloads

32,437 Views


Description

This component will work with any SQL Server, MySQL, ODBC and OleDb compliant database. In addition to keeping database connection strings more secure, Ambientware DBUtils removes the need to type out connection code on each page and also reduces update, insert and delete statements to just one line of code. You can get and execute Data Readers,DataSets and Execute Scalar SQL statements in one easy step. This utility is packaged with a PDF document generator, Zip utility, Error Catcher and a download to browser utility.

Syntax Example

Sub GetDataObjects() Dim lstrSQL as String Dim MyScalarValue as Integer Dim objDBUtils As New Ambientware.Utils.Dbutil() lstrSQL = "Select * From MyTableName" 'returns a populated dataset Dim MyDataSet as DataSet = objDBUtils.GetDataSet(lstrSQL, “MyTableName”) lstrSQL = "Select Count(*) From MyTableName" 'returns count only Dim MyScalarValue = objDBUtils.ExecuteScalar(lstrSQL) lstrSQL = "Select * From MyTableName" 'returns a populated datareader Dim MyDataReader as IDataReader = objDBUtils.GetSQLDataReader(lstrSQL) lstrSQL = "Update MyTableName Set MyColumn = 'Foo' " 'executes the update, insert or delete statement objDBUtils.ExecuteNonQuery(lstrSQL) objDBUtils.Close objDBUtils = Nothing End Sub

Reviews

Submit a review

Simple Wrapper

Reviewed by: ccivici on Tuesday, September 23, 2003

2 Stars

This component seems like a simple wrapper around ADO.NET apis and does not provide any functionality other than shortening the code. e.g It does not support calling stored procedures, caching, etc.