473,800 Members | 2,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stored Procedures or Web services

Hi there.

I am developing a client-server application using C# and SQL Server 2005.

Right now, I am using web services to access database, but I'm wondering if
this is the best way. The purpose of using web services is to reuse them
with a web application, for instance. However, I think I could use stored
procedures, and when I need to build a web application, I could then build a
web service to call this stored procedures.

What are the advantages/disadvantages of each one?

Thanks in advance.

Regards,

Marco
Jun 27 '08 #1
3 1750

"Best" is subjective.
You might look at WCF, which gives you better future flexibility.

Check
http://sholliday.space s.live.com/Blog/cns!A68482B9628 A842A!158.entry
or maybe look at Astoria
http://www.microsoft.com/downloads/d...displaylang=en
I have a web application that calls/uses/consumes WCF services.



"Marco Pais" <marco.pais[at]gmail.comwrote in message
news:Ow******** ******@TK2MSFTN GP04.phx.gbl...
Hi there.

I am developing a client-server application using C# and SQL Server 2005.

Right now, I am using web services to access database, but I'm wondering
if this is the best way. The purpose of using web services is to reuse
them with a web application, for instance. However, I think I could use
stored procedures, and when I need to build a web application, I could
then build a web service to call this stored procedures.

What are the advantages/disadvantages of each one?

Thanks in advance.

Regards,

Marco

Jun 27 '08 #2
On Apr 30, 10:57 am, "Marco Pais" <marco.pais[at]gmail.comwrote:
Hi there.

I am developing a client-server application using C# and SQL Server 2005.

Right now, I am using web services to access database, but I'm wondering if
this is the best way. The purpose of using web services is to reuse them
with a web application, for instance. However, I think I could use stored
procedures, and when I need to build a web application, I could then build a
web service to call this stored procedures.

What are the advantages/disadvantages of each one?

Thanks in advance.

Regards,

Marco
This is what i think..

It will depend on many factors. like where will your c# app going to
run? is this an intranet application or should it also work from your
home (without vpn)

I am assuming that you are going to use Stored procedures with Data
access layer. with the web service/WCF.

If it is intranet app,
you will get better performance if you use your app + Stored
procedures with Data access layer
If your web application will be Asp.net application then you can re-
use the "Stored procedures with Data access layer"
but if you have some other technology you will better off with the web
services + Stored procedures with Data access layer approach.

if your app is going run over internet, then web services/wcf approach
would be better

Jun 27 '08 #3
Marco Pais wrote:
I am developing a client-server application using C# and SQL Server 2005.

Right now, I am using web services to access database, but I'm wondering if
this is the best way.
You should only expose your DAL as web service in very special
circumstances.

You should expose your BLL as web service if you foresee a need to
use it from apps written in different technologies/languages.
The purpose of using web services is to reuse them
with a web application, for instance.
No. See above.
However, I think I could use stored
procedures,
You could.

But the decision whether to use SP's or plain SQL in your DAL is not
related to the interfaces provided by DAL and BLL.

and when I need to build a web application, I could then build a
web service to call this stored procedures.
See above.
What are the advantages/disadvantages of each one?
Web services and stored procedures can not replace each other so
advantages/disadvantages between them does not have any meaning.

Arne

Jun 27 '08 #4

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

Similar topics

3
5581
by: Narayan Appachar | last post by:
Hi, We were able to build stored procedures without any problems till now. Now while building procedures, we are getting the following errors ------------------------------------------ Create stored procedure returns -7032. SQL7032N SQL procedure "TESTMD5_1" not created. Diagnostic file is "P7374587.log". SQLSTATE=42904
24
3818
by: Benjamin Doyle | last post by:
In Chip Irek's "A PRIMER ON USING DB2 WITH .NET" (www.15seconds.com), he states that "...ODBC doesn't support DB2 stored procedures. So if you are building an application heavily dependant on stored procedures, you need to eliminate ODBC as your access method and consider OleDb or the managed provider." Mr Irek is an IBM Architect with Global Services and according to the article, someone with .NET experience. Now, I'd ask Mr Irek...
2
9247
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 problems doing this. I wanted to implemented a generic "Helper" class like this: /** * Helper
5
3488
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored Procedures. I thought stored pricedures were an Oracle/MS SQL Server thing and don't know how they work with Access Jet. I've looked at some of the help on stored procedures in A2003, but really don't understand what's going on. Can someone...
2
4718
by: nbohana | last post by:
I am trying to code an compile a stored procedure without success. So I generated one using Microsoft Visule C# .Net. and it follows. One of the problems is that it will not compile. Some of the message won't to put ';' all over the place, I some need help!!! These are some of the compile messages. ; expected Cannot use more than one type in a for, using, fixed, or declaration statement = (cannot specify constructor arguments in...
3
1124
by: Peter | last post by:
I just bought VS.NET Standard 2005. But there aren't any projects for Windows Services and I know that I cannot develop VB.NET Stored Procedures (perhaps no projects for this too) But can I get around the above two limitations (develop them without the above project types). I assume that there would be additional work involved, but could i achieve the above? Please could someone point me in the right direction.
28
72571
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and 2005 Test Environments. What is the purpose of a view if I can just copy the vode from a view and put it into a stored procedure? Should I be accessing views from stored procedures?
2
1706
by: Dean Slindee | last post by:
Anyone know of a location for a simple example of a web service using stored procedures to Read, Insert, Delete and Update rows in MS SQL Server? Thanks, Dean S
3
5123
by: leesquare | last post by:
Hello, I need some help getting output values from my stored procedures when using adodbapi. There's an example testVariableReturningStoredProcedure in adodbapitest.py, and that works for my system. But my stored procedure also inserts and accesses a table in the database. Here's what I have it boiled down to: So, when I have
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10276
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7580
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.