all groups > dotnet component services > december 2003 >
You're in the

dotnet component services

group:

Problems with setting up an n-tier architecture


Problems with setting up an n-tier architecture Scott
12/11/2003 3:15:21 PM
dotnet component services:
I thought I would stop hard-coding all my db commands and came up with (what
I thought is) an n-tier architecture to deal with data access. I have set
up a simple scenario to test:

I have an object named "SQLConnect.vb" which is supposed to be the generic
data layer and has a function in it called "RunSQLWithDataSet" and takes a
SQL string and a connection string. The idea is that a business object can
call it with the 2 pieces of information and return a dataset. This works
fine.

Taking it to the next level, I wanted to make a "RunStoredProc" Function to
call stored procedures. My thinking is that I would pass a 2D array to pass
the datatypes and values which would be passed to the stored procedure in
the function. In short: this is not working. Is there an example or
template for this sort of thing available? I can't believe I am the only
one to try this. Is there a better way? Is there ideas out there already
on how to architect this?

Scott

Re: Problems with setting up an n-tier architecture Nick Malik
12/12/2003 6:00:16 AM
an excellent example can be found in the Microsoft.ApplicationBlocks.Data
Application Block.

see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp

--- Nick Malik

[quoted text, click to view]

AddThis Social Bookmark Button