473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

invoke Stored Procedures through a generic class

hello,
I am using Oracle Stored Procedures to return and modify data in my
application which is developed using ASP. NET(VB.NET).
How are the SP's invoked from the application
1) Are they directly called from the application like
sql = "{ CALL PROCEDURE_NAME(?,{resultset 0, io_cursor} ) }"
OR
2) Can we have a generic class (VB/C#) which has calls to all the stored
procedures and the client application would call this class
Client Code would be something like
SQLstatment = ClassName.method1( )

The generic Class would contain:
Class Name {
method1( ){
//Connect to the DB
//fetch records from DB using SP's
}
}

I would be glad to hear from inputs on these and if anyone has used a
similar approach like 2)...please share some more info abt the same.

thx,
dennis
Nov 20 '05 #1
1 3506
Dennis,
Following the OOP lead of layering software (UI Layer, Business Layer, Data
Layer).

I would use a variation of #2, depending on other requirements of the
application.

Remember these are logical layers not physical layers. You can layer your
software within a single project, destined for a single machine.

If you read Martin Folwer's book "Patterns of Enterprise Application
Architecture" from Addison Wesley. He offers a handful of patterns to
address this issue: Data Table Gateway, Row Data Gateway, Active Record,
Data Mapper.

http://www.martinfowler.com/eaaCatalog/

Hope this helps
Jay

"dennis" <de****@hr.rutgers.edu> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
hello,
I am using Oracle Stored Procedures to return and modify data in my
application which is developed using ASP. NET(VB.NET).
How are the SP's invoked from the application
1) Are they directly called from the application like
sql = "{ CALL PROCEDURE_NAME(?,{resultset 0, io_cursor} ) }"
OR
2) Can we have a generic class (VB/C#) which has calls to all the stored
procedures and the client application would call this class
Client Code would be something like
SQLstatment = ClassName.method1( )

The generic Class would contain:
Class Name {
method1( ){
//Connect to the DB
//fetch records from DB using SP's
}
}

I would be glad to hear from inputs on these and if anyone has used a
similar approach like 2)...please share some more info abt the same.

thx,
dennis

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: dwilliams | last post by:
Our organization has implemented an ASP.net application with an n-tiered architecture, made up of a business/data layer that calls T-SQL Stored procedures. We are attempting to better manage the...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
1
by: VM | last post by:
I'm working on a win appication that is constantly querying a small-sized DB. Until now, I've been using Selects from within my app but, all of a sudden I remembered of an application I was...
0
by: Amber | last post by:
Stored procedures are faster and more efficient than in-line SQL statements. In this article we will look at two SQL Server stored procedures; one using an input parameter and one not, and see how...
45
by: John | last post by:
Hi When developing vb.bet winform apps bound to sql server datasource, is it preferable to use SELECTs or stored procedure to read and write data from/to SQL Server? Why? Thanks Regards
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
0
by: jer006 | last post by:
Hi, This is more of a general question... I have a series of stored procedures (chain of procedures) in db2 on an AS400 which are executed from a SQL Server Job, when I execute the job manually...
3
by: codefragment | last post by:
Hi I have a chunky bit of sql that I will want to call from a number of places. It will return a few thousand rows. Whats the best way of structuring this? 1) I initially thought of using...
1
by: Thomas R. Hummel | last post by:
Hi, I've been tasked by a client to come up with documentation on standards to follow in creating a data access layer implemented through stored procedures. When talking about a data access...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.