General sql database access

I'm currently developing a number of websites for various clients and have built a useful Content Management System for each.  Almost everything on my site is database generated and each page makes multiple database calls for many different things.  My problem is that my database control is quite rudimentary and is therefor letting down the rest of my application.  

I have implemented the GotDotNet Application Block 3.1 and generally use the ExecuteReader method for everything I do. I programatically generate all database returns using while ( IDataReader.Read() ) and then close the IDatareader using Close(). I have run into a problem with this however in that the Datareader is closed but the SqlConnection remains open. I have cannot for the life of me find where to explicitly close the connection using the GotDotNet DAAB.
And so this brings me to my question. I'm on the hunt for a new solution. I have thought of building a class which receives a SqlCommand, executes a DataReader based on that command, builds a multidimensional array from the results and closes all database connections. Then I can play with my array to my heart's content and not worry about database leakages. Is this a good idea?
Should I be using a Typed DataSet to do this? and if so, can someone please direct me to a useful site that doesn't ONLY build a dataset to bind to a dropdownlist.
Alternatively, if anyone knows of a simple to use, well built SQL database class, I'd love to know about it.
Thanks for any help you can offer.
1/10/2005 3:56:59 AM 16182 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 22

You might try your question on the Architecture forum.

Terri Morton
Engagement Manager, Neudesic

How to ask a question

1/13/2005 3:21:51 AM

Similar Artilces:

New errors access MS SQL Server Database on (CREATE DATABASE and Batch SQL Statement)
------=_NextPart_000_002B_01C2F2CB.0C201FF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm running ActiveState perl 5.8.0 on a WIN2K box with MS SQL Server = 2000. Recently I updated DBD-ODBC to v1.05 and DBI to v1.35 Now I get the following errors executing some sql commands CREATE SQLSTMT:[CREATE DATABASE POMS_SER ON (NAME =3D 'POMS_SER_DAT', = FILENAME =3D 'd:\Database\POMS\POMS_SER_Data.MDF', SIZE =3D 10MB) LOG ON = ( NAME =3D 'POMS_SER_LOG', FILENAME =3D = 'd:\Database\POMS\POMS_S...

cannot access sql databases through iis using .net 1.1
Created a project using web matrix, when I run the application using web matrix server it works fine and my sql database get accessed and web pages are update with info from the sql database. Then I try running application using iis and the first web page displays correctly but when it tries to access the database to refresh the page with data from sql database it fails. Iget Login failed for user 'AMD2200\ASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and wh...

Access Database and SQL Server database
Hi, I have an access database server and a sql server DB. The  Structure of both DB is same . The data is updated or inserted in access DB. I want to update SQL Server DB on a any event say button click. All updated data or new data in access DB should be reflected on SQL Server DB . Can anyone guide on the approach to be attempted. Thanks   Mark this as an answer if you find my it helpful.Thanks,Anubhuti ONe approach would be to use the System.Data.OleDb library and store connection strings for each database in your web.config file.  Each time you need ...

Problem accessing SQL Stored Procedure From .Net using hibernate object
Hi, I am calling a SQL Stored procedure from .net application using Hibernate object, but somehow its telling me "The 'callable' attribute is not declared.", I am not sure what's wrong I have done here. Will really appreciate if someone can help me for this. Herewith I am providing my Stored Procedure, my .hbm file and code to call it. can someone pls tell me what's wrong in this? Also, if possible, pls tell me how to set result in a list object. Thanks in advance, ######################################### MY STORED PROCEDURE : ALTER PROCEDURE [dbo].[RulesDetails_...

a data access layer using xml as the datasource, rather than a sql database
HiI have been reading and learning a lot from the tutorial about how build and use a DAL (see ). However the tutorial uses a sql database. I am working on a project where the data is coming from a dynamic xml file - the schema doesnt change but the data is frequently changing.Can someone point me in the right direction for how I could build a DAL using xml as the datasource? Kind regards    When you create a DAL, it usually accesses a Database. What you need to do is for the methods like Add,Delete,Get, etc ... to...

Accessing a User Control's Properties through Object/SQL DataSource Parameters
I have a simple user control that displays the results of a DB table in a GridView. On the form of the User Control I have GridView1, in the background .cs I have a public Property UserID At the moment it works using direct databind in the background .cs file, but If I was add some kind of DataSource Control (Object or SQL) and Bind that to the Gridview, is there a way to connect the Public Property using some kind parameter tags?  I could just copy the UserID to a Label (During FormLoad) and then using the ControlParameter tags and reference the label. On the L...

Can't purge date object into sql string for access database
I'm trying to run an sql statement in my .asp page with MSAccess as my dbase, but when trying to run a query to bring up events that are scheduled for today and hereafter, I get a "Too few parameters. Expected 1 " error on my sql string with the following: dim mydate mydate = Date() SELECT eid,name,venue FROM events WHERE dateevent >= #" & mydate & "# order by name" thanks in advance chumley ...

How can I update a SQL database with an Access database
I need to update an SQL database with an access database that is built on queries.  I need to do this nightly.   Can someone explain how to write the query for this and then I could add it to my nightly maintenance.   Thank you DeeDarlene D. you can reference your Sql Database through Access either with linked tables or ADO.  As long as you have update rights on the Sql Tables, you can use your Access queries to update the Sql tables.Good Luck and happy programming!Let's build community! If my post helped you, mark it as the Answ...

updating Sql database from linked Access database
I got thrown into a new project that is going to require me to update an SQL server database tables from an Access table on the backend of an Oracle database on another server. At the end of each day the Access dabase will be updated from the Oracle database. What I need to do, is when the Access database is updated I need to have the table in the SQL database automaticaly updated. When a new record is added to the Access table I need the new record added to the SQL table. When a record is deleted in the Access table I need to keep that record in the SQL table and set a field to a value (...

migrate access database to sql anywhere database
I am having trouble migrating a Microsoft Access database to SQL Anywhere database. Has anyone done this? I would like to use this database in sql anywhere to utilize the native drivers. Thankyou in advance david You can use the pipeline to migrate all tables. If you have a tool like Powerdesigner, you can reverse engineer the database structure. BTW, SQLAnywhere uses ODBC. There are no native drivers. Terry Dykstra (TeamPS) David Bowles <> wrote in article <>... > I am having trouble migrating a Microsoft ...

Converting Access database to the Sql Server database
how can I convert or transfer my Access database to SQl Server database ? Thanks in advance.HighOnCodingWanna get high! Try "the Upsizing wizard". Look in Access help...

Conversion of a DNN Access database to SQL database
We have an Access version of the Dot Net Nuke database. We are upgrading to a server with SQL. We'd like to transfer the content from the Access database to the SQL database. Is this possible? Is there a utility available for this conversion. What should we be aware of as we try this? Take a look at Rob Visit - index of DNN threads - hand picked quality threads. TextLayout Module - create multiple column layouts easily Thank for your excellent process! I was able to successfully move the data. ...

Can you convert access database data over to an SQL Database?
I would like to start using SQL, how would I convert my data in MS Access over to an SQL Server Database? Q.Xykal:how would I convert my data in MS Access over to an SQL Server Database? In Access, there is an upsizing/conversion tool you can run to create an equivalent SQL Server DB.Atlernatively you can also use SQL Server to import all the tables/data from Access.  This is very good news. Thank you....

upload image to MS Access database or SQL database
howto upload image, picture,files or binary into the MS Access database or SQL database? and how to read the image, picture, files or binary from the MS Access or SQL database? Anyone have any idea or sample script?Thanks & Regards--"Don't just always label good or bad about something, always have something is invisible from nude eyesight. " Below link could helps you for your question Thank You sreedhark This also

Web resources about - General sql database access -

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Five million customers affected by Vtech database hack
Toy and educational material seller Vtech has revealed five million customers were affected by a hack of its app database and has also suspended ...

Ben Carson calls for database of all foreigners in US
Boston Herald Ben Carson calls for database of all foreigners in US Boston Herald Republican presidential candidate, Dr, Ben Carson, center, ...

GOP rivals condemn Donald Trump for backing Muslim database
COLUMBIA, S.C. (AP) — Retired neurosurgeon Ben Carson said Saturday that he wants to expand the government's surveillance operations aimed at ...

Donald Trump wants "surveillance of certain mosques," database of refugees - Videos - CBS News
... rally in Birmingham, Alabama, Republican presidential candidate Donald Trump called for increased scrutiny over mosques, along with a database ...

Trump Wants A Database For All Syrian Refugees Who Enter America
Trump Wants A Database For All Syrian Refugees Who Enter America

US Republican rivals blast Donald Trump for Muslim database comments
US Republican rivals blast Donald Trump for Muslim database comments - Donald Trump said he would implement a database to keep track of Muslims ...

VTech Admits Lack of Database Security Opened Door to Hack
A SQL injection, a common software flaw, was found to be the root cause in the VTech breach.

Animal Venom Database Could Be Boon To Drug Development
A new public database that catalogs animal toxins could spur the development of new drugs made with compounds found in animal venom.

Resources last updated: 12/6/2015 3:36:13 AM