|
-
Oct 3rd, 2003, 03:19 AM
#1
Thread Starter
Frenzied Member
Wrap DB access
I was thinking about databases when I recently started rather big project. And I got a few ideas about which would be the easiest way to give a web or cs application database support.
My thougt was to create a class that uses interfaces that the user can use to get the data required from any given database (conn string).
I need five classes
*connection (IConnection)
*datareader(IDataReader
*dataadapter(IDataAdapter)
This is the only class the user ever have to work with
it creates all other classes/interfaces))
*dbAccess(IDbAccess)
So, my only real problem is how to handle stored procedures. My company is mainly working with stored procedures and since they can be rather customizable(it would be rather easy to work with SQL-text ONLY), I haven't found an intelligent way to implement SP into this DbAccess class... The code to do it would be heavier than just declare an oledbcommand and an adapter and add some parameters and execute.
Anyone that has done something like this and have some comments?
In ADO and ASP we did this the simple way by creating class modules that contained lots of methods for fetching the information. It didn't use any of the nice features of OO.
kind regards
henrik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|