473,386 Members | 1,860 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,386 software developers and data experts.

View or Stored Proceedure?

Hope you can give me some advise.

I am wanting to build a databse driven website. I am using Access to
connect to an SQL 2000 server to create tables etc.

I am using ASP/ASP.Net to build my site.

The question I have is on best method to retrive data. Lets say I have
a Table of Products, and one of those fileds is CurrentProduct and its
True or False. On my web page I want to retreive and list all products
that are marked as CurrentProduct True.

I could do this as part of the SQL statement in the web page ie
"Select * From Products Where CurrentProduct=True", I could create a
View that only shows Current Products and use Select * From
CurrentProductsView or I could create a stored prodceedure, that looks
very much like a view.

I know a bit about Access and Queries which is why I am using access
to manage Sql, but very liitle if anything about Stored Proceedures.
When should I use what? And what are the advantages / dis-advantages
of each approach?

Many thanks for any help you are able to provide.
Jul 20 '05 #1
1 2678

"John" <jo************@hotmail.com> wrote in message
news:9a**************************@posting.google.c om...
Hope you can give me some advise.

I am wanting to build a databse driven website. I am using Access to
connect to an SQL 2000 server to create tables etc.

I am using ASP/ASP.Net to build my site.

The question I have is on best method to retrive data. Lets say I have
a Table of Products, and one of those fileds is CurrentProduct and its
True or False. On my web page I want to retreive and list all products
that are marked as CurrentProduct True.

I could do this as part of the SQL statement in the web page ie
"Select * From Products Where CurrentProduct=True", I could create a
View that only shows Current Products and use Select * From
CurrentProductsView or I could create a stored prodceedure, that looks
very much like a view.

I know a bit about Access and Queries which is why I am using access
to manage Sql, but very liitle if anything about Stored Proceedures.
When should I use what? And what are the advantages / dis-advantages
of each approach?

Many thanks for any help you are able to provide.


Stored procedures are usually the best way to retrieve data - see here for a
good explanation of why:

http://www.algonet.se/~sommar/dynamic_sql.html#Why_SP

Simon
Jul 20 '05 #2

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

Similar topics

2
by: Tavish Muldoon | last post by:
What a pain trying to insert data into a table from a stored proc. My webform asks for 16 pieces of data - which then gets written to the database. I found this easier than the crap below...
6
by: John Webb | last post by:
Hope someone can help. I am trying to write a stored proceedure to display sales activity by month and then sum all the columbs. The problem is that our sales year starts in April and end in...
1
by: Melissa Meyer via SQLMonster.com | last post by:
How do you set a stored proceedure for automatic execution? -- Message posted via http://www.sqlmonster.com
0
by: Varun Gupta | last post by:
Hi All, can anybody let me know the steps how to call the stored proceedure that is developed in db2 or sql, into unix shell script. Point: Stored proc. may or may not have parameters. Point:...
2
by: Problematic coder | last post by:
I have a form based application that inputs values into various oracle tables, after it has done this I want to call a stored proceedure in Oracle which is already written to do more work on this...
9
by: Problematic coder | last post by:
The intention is to call a stored proceedure which sets flags in the database, this requires no parameters and the page does not need an output from the stored proceedure, though is this is...
0
by: ig.martix | last post by:
I'm a bit new to asp. What I'm looking to doing is having three input boxes on a page. As an example I would like for the user to input a employee ID in the first input box and then wither...
4
by: Mick Walker | last post by:
Hi Everyone, I am stumped here. I have the following stored proceedure:P CREATE PROCEDURE . @SupplierSKU varchar(50), @RetVal int AS Select @Retval = count(*) from dbo.ImportLines Where =...
8
by: jthep | last post by:
Is there a way to create a stored procedure where more than one type of parameter can be entered? For example, a user can enter a int type, char(4) type, or nothing in the same stored proceedure.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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...

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.