473,404 Members | 2,213 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,404 software developers and data experts.

Are stored procedures practical using ASP only?

Hello,

The aspfaq.com seems to really push stored procedures, and I hear the
same advice here all the time. So I want to take the advice.

Is it possible to create and practically maintain, delete, use, etc..
stored procedures soley from asp (i.e., no GUI or console- like being
hosted on Brinkster)?

The tutorial on aspfaq.com mentions that stored procedures can be
created from asp code- how? Do you just send the stored procedure you'd
type into the GUI with oConn.execute() instead?

Thanks!
Jul 19 '05 #1
10 2281
Dragonhunter wrote:
Hello,

The aspfaq.com seems to really push stored procedures, and I hear the
same advice here all the time. So I want to take the advice.

Is it possible to create and practically maintain, delete, use, etc..
stored procedures soley from asp (i.e., no GUI or console- like being
hosted on Brinkster)?

The tutorial on aspfaq.com mentions that stored procedures can be
created from asp code- how? Do you just send the stored procedure
you'd type into the GUI with oConn.execute() instead?

Thanks!


You should design, create and test stored procedures in the native database
environment where they will run. With SQL Server, it would be criminal to
not take advantage of the query optimization tools provided by Query
Analyzer. There are few people with the ability to build optimized queries
from scratch, knowing exactly what indexes to build and knowing that those
indexes will be used without recourse to the execution plans and index
analyses provided by query analyzer. Are you one of those people? If not,
stop thinking about creating and debugging your stored procedures from ASP,
unless you want to guarantee that your application will not perform
optimally.

However, if you must, you can execute a CREATE PROCEDURE script via ADO.
Look up the syntax in BOL.

Bob Barrows
Jul 19 '05 #2
As Bob says, making a SP is easier with SQL Server tools. If you can't
afford 10,000 bucks for it, fret not. You can go to the MS site and obtain
the developer edition for, like, really cheap. Not sure exactly. If nothing
else, you can buy the Action Pack for $300 and get lots of software,
including SQL Server.
"Dragonhunter" <dr************@yahoo.com> wrote in message
news:3F***************@yahoo.com...
Hello,

The aspfaq.com seems to really push stored procedures, and I hear the
same advice here all the time. So I want to take the advice.

Is it possible to create and practically maintain, delete, use, etc..
stored procedures soley from asp (i.e., no GUI or console- like being
hosted on Brinkster)?

The tutorial on aspfaq.com mentions that stored procedures can be
created from asp code- how? Do you just send the stored procedure you'd
type into the GUI with oConn.execute() instead?

Thanks!

Jul 19 '05 #3
Sorry, I don't know what you mean by 'optimized query'. Im used to getting
data, I guess in a simple way, out of my database using asp and sql statements
executed from asp. I usually do select statements matching a certain ID or
username. I don't usually select with some huge sql statement a page long.
Would I still benefit from an 'optimized query?'

I can't really afford sql server even at $300. I'm using Access right now but
after reading the aspfaq and peoples comments here I want to try 'the real
way'. My database works fine right now with the website but I have the feeling
it will break when 10 users are trying to do things at the same time,
especially after reading the stuff about Access in aspfaq.com I'm hosted on
Brinkster and was hoping to use their $27/mo sql server plan if and when Access
breaks, but there is no console or GUI obviously. Could I debug my SQL
statements like I normally do in ASP and then put a header and footer of some
sort around it and turn it into a stored procedure via asp?

Thanks!!

Bob Barrows wrote:
You should design, create and test stored procedures in the native database
environment where they will run. With SQL Server, it would be criminal to
not take advantage of the query optimization tools provided by Query
Analyzer. There are few people with the ability to build optimized queries
from scratch, knowing exactly what indexes to build and knowing that those
indexes will be used without recourse to the execution plans and index
analyses provided by query analyzer. Are you one of those people? If not,
stop thinking about creating and debugging your stored procedures from ASP,
unless you want to guarantee that your application will not perform
optimally.

However, if you must, you can execute a CREATE PROCEDURE script via ADO.
Look up the syntax in BOL.

Bob Barrows


Jul 19 '05 #4
Since you are not using SQL Server, this is not as relevant. You are,
however, much better off debugging your queries in the Access environment
using the Query Builder tool. This helps in later debugging since any errors
in running the query are likely to be in your asp code, not in the query
itself. Also, you can use the Access performance analyzer to see if you
should create indexes on your tables to improve the performance of your
queries, something you can't do from ASP.

See these threads for further pointers:
http://tinyurl.com/n6vf
http://tinyurl.com/n6vm

Dragonhunter wrote:
Sorry, I don't know what you mean by 'optimized query'. Im used to
getting data, I guess in a simple way, out of my database using asp
and sql statements executed from asp. I usually do select statements
matching a certain ID or username. I don't usually select with some
huge sql statement a page long. Would I still benefit from an
'optimized query?'

I can't really afford sql server even at $300. I'm using Access
right now but after reading the aspfaq and peoples comments here I
want to try 'the real way'. My database works fine right now with
the website but I have the feeling it will break when 10 users are
trying to do things at the same time, especially after reading the
stuff about Access in aspfaq.com I'm hosted on Brinkster and was
hoping to use their $27/mo sql server plan if and when Access breaks,
but there is no console or GUI obviously. Could I debug my SQL
statements like I normally do in ASP and then put a header and footer
of some sort around it and turn it into a stored procedure via asp?

Thanks!!

Bob Barrows wrote:
You should design, create and test stored procedures in the native
database environment where they will run. With SQL Server, it would
be criminal to not take advantage of the query optimization tools
provided by Query Analyzer. There are few people with the ability to
build optimized queries from scratch, knowing exactly what indexes
to build and knowing that those indexes will be used without
recourse to the execution plans and index analyses provided by query
analyzer. Are you one of those people? If not, stop thinking about
creating and debugging your stored procedures from ASP, unless you
want to guarantee that your application will not perform optimally.

However, if you must, you can execute a CREATE PROCEDURE script via
ADO. Look up the syntax in BOL.

Bob Barrows


Jul 19 '05 #5
Generate one in SQL and export it....
It'll give you the exact syntax to recreate it through code

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------
"Dragonhunter" <dr************@yahoo.com> wrote in message
news:3F***************@yahoo.com...
Hello,

The aspfaq.com seems to really push stored procedures, and I hear the
same advice here all the time. So I want to take the advice.

Is it possible to create and practically maintain, delete, use, etc..
stored procedures soley from asp (i.e., no GUI or console- like being
hosted on Brinkster)?

The tutorial on aspfaq.com mentions that stored procedures can be
created from asp code- how? Do you just send the stored procedure you'd
type into the GUI with oConn.execute() instead?

Thanks!

Jul 19 '05 #6
"Dragonhunter" <dr************@yahoo.com> wrote in message
news:3F**************@yahoo.com...
Sorry, I don't know what you mean by 'optimized query'. Im used to getting data, I guess in a simple way, out of my database using asp and sql statements executed from asp. I usually do select statements matching a certain ID or username. I don't usually select with some huge sql statement a page long. Would I still benefit from an 'optimized query?'

I can't really afford sql server even at $300. I'm using Access right now but after reading the aspfaq and peoples comments here I want to try 'the real way'. My database works fine right now with the website but I have the feeling it will break when 10 users are trying to do things at the same time,
especially after reading the stuff about Access in aspfaq.com I'm hosted on Brinkster and was hoping to use their $27/mo sql server plan if and when Access breaks, but there is no console or GUI obviously. Could I debug my SQL statements like I normally do in ASP and then put a header and footer of some sort around it and turn it into a stored procedure via asp?

Thanks!!


Consider Web Matrix.
1. It a FREE (as in beer) community based development environment for
ASP.NET
2. One of its FREE (as in beer) optional components is Microsoft SQL
Server Desktop Engine (MSDE). This is a scaled down version of SQL
Server, but the database engine is the same so anything you develop for
MSDE will work when you move to SQL Server on your hosting provider. The
only limitation is connection throttling, which limits you to five (5)
simultaneous connections, if memory serves. This should not be a problem
in a local development environment
3. Many (although not all) database administration tasks can be managed
directly from the Web Matrix interface. This is important since MSDE
does not come with a GUI Admin interface of its own like SQL Server
Enterprise Manager. For those tasks that you cannot perform through Web
Matrix, you can use the oSQL command-line utility that comes with MSDE.
Knowing how to do things from the command line is good for you! It'll
put hair on your chest.
4. Web Matrix is a nice way to familiarize yourself with ASP.NET and
..NET in general if you are so inclined.

Here's a link: http://asp.net/webmatrix

HTH
-Chris
Jul 19 '05 #7
My last thread I started veered from this question, which I don't think was
answered (my fault for asking too much).

Is it possible to create stored procedures from ASP on a hosted server (like
Brinkster) and if so, how?

Thanks again.

Jul 19 '05 #8
Dragonhunter wrote:
My last thread I started veered from this question, which I don't
think was answered (my fault for asking too much).

Is it possible to create stored procedures from ASP on a hosted
server (like Brinkster) and if so, how?

OK, I don't know why it matters who is hosting your site, but ...

From my previous reply:
"However, if you must, you can execute a CREATE PROCEDURE script via ADO."

Like this:
cn.execute "create procedure myfirstprocedure as select * from
pubs..authors",,129

The above applies to SQL Server stored procedures. You need to use ADOX to
create saved queries in Access databases. See here for info on using ADOX:
http://msdn.microsoft.com/library/en...ndamentals.asp

I must reiterate that you will be selling yourself short if you don't
develop your procedures (SQL Server) or saved queries (Access) in the native
database environment. Even if you have to develop them locally and use asp
to install them on the hosted database.

Bob Barrows

Jul 19 '05 #9
BTW, there are tools you can use to remotely administer SQL Server databases
via asp. Here's a couple I found via a google search:
http://www.codeproject.com/useritems/sqldmo1.asp
http://sqlserveradvisor.com/doc/12569
http://www.fawcette.com/javapro/2002...awan_12_16_02/
Jul 19 '05 #10
On Sat, 13 Sep 2003 20:42:29 GMT, Dragonhunter
<dr************@yahoo.com> wrote:
My last thread I started veered from this question, which I don't think was
answered (my fault for asking too much).

Is it possible to create stored procedures from ASP on a hosted server (like
Brinkster) and if so, how?

Thanks again.
Yes. Of course. But the stored procedures will be associated with the
database you are using.

SP support varies a lot with you database. In some it is excellent in
others only rudimentary.
... if so, how?


You create them normally in the database - you can even use the DDL to
do this by sending SQL scripts in ASP but I'd use the normal database
interface - whatever that is. SPs are invoked via ADO and specific SP
support depends on the driver.

The stored procedures are easier to use than SQL scripts because:
1. you can test the SQL script on the database before putting it into
a stored proc.
2. There are fewer problems handling parameters - with SPs you don't
need to remove quotes.
3. Processing speed is increased, especially with complex data
processing operations, which is faster when done by the database.
Ideally you can do all your data processing in SQL in SPs so you no
longer need to make a server call for each line of SQL script.
4. The SPs execute faster than scripts - sometimes much faster.

The nominal disadvantage is that the ASP app is more portable with the
SQL code in scripts inside the ASP but, to me, this is purely
theoretical as SQL syntax varies a lot between databases and it is not
as easy as people imagine to just change the database engine to some
other.

Jul 19 '05 #11

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

Similar topics

2
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the...
1
by: Rhino | last post by:
I am trying to get a sense of requirements and best practices for Java stored procedures in DB2 V7.2 for Windows. 1. Is it required or recommended that any of the following be closed before...
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...
5
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...
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
2
by: kanda | last post by:
Hello. I am developing the application (VBA&ODBC, to be exact) which periodically calls the stored procedures in the IBM DB2. A few of the procedures require executing with isolation level RR (...
28
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...
12
by: Jason Huang | last post by:
Hi, In my C# Windows Form application project, I have done all queries on my codes. Now I wanna try using the Stored Procedure. But I am not clear about why using the stored procedure. Would...
10
by: Dick | last post by:
Using Visual Studio 2003 you were able to manage SQL stored procedures with Visual Source Safe. So long as Visual Studio was used as the editor, it was imposible to make a change to a stored...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.