We have over 100 asp pages that reference a table (distribution_components).
We added a new column and primary key to that table, so now we have to modify
the where clause to include that column (we have to make the new column = to a
session variable in the page)
The table appears 531 times in our code. Is there some util or method that
allows us to change it globally, other than going to each occurrance, and
adding the new column to the where clause 11 1838
> The table appears 531 times in our code. Is there some util or method
that allows us to change it globally, other than going to each occurrance, and adding the new column to the where clause
If the sql statements are exactly the same, you could do a global search and
replace using Visual Studio, or something similar. You could probably at
least knock a few off if you do a search and replace on various instances of
the sql statements.
Other than that, I'm not sure of any other way... I think you're out of
luck.
This might be a good time to switch to using stored procedures.
"johnston" <jo******@thot.com> wrote in message
news:3f***********************@newscene.com... We have over 100 asp pages that reference a table
(distribution_components). We added a new column and primary key to that table, so now we have to
modify the where clause to include that column (we have to make the new column =
to a session variable in the page)
The table appears 531 times in our code. Is there some util or method
that allows us to change it globally, other than going to each occurrance, and adding the new column to the where clause http://www.aspfaq.com/2201 http://www.aspfaq.com/2423
"johnston" <jo******@thot.com> wrote in message
news:3f***********************@newscene.com... In article <OT**************@TK2MSFTNGP12.phx.gbl>, "Aaron Bertrand - MVP"
<aa***@TRASHaspfaq.com> wrote:This might be a good time to switch to using stored procedures. "johnston" <jo******@thot.com> wrote in message news:3f***********************@newscene.com... We have over 100 asp pages that reference a table (distribution_components). We added a new column and primary key to that table, so now we have to modify the where clause to include that column (we have to make the new column
=to a session variable in the page)
The table appears 531 times in our code. Is there some util or method that allows us to change it globally, other than going to each occurrance,
and adding the new column to the where clause
do you have a good web page or article on doing that? Lots of people
sugguest it but i have yet to see a good expalnation with example
Or at least use a function to return an array of your data every place you
need it 531 times. Good lord. I don't mean this to sound rude johnston,
really, but let this be a lesson to you.
Ray at work
"TomB" <sh*****@hotmail.com> wrote in message
news:Oa**************@tk2msftngp13.phx.gbl... I disagree.
A good time to switch to using stored procedures is before you've written 531 sql statements in your code.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:OT**************@TK2MSFTNGP12.phx.gbl... This might be a good time to switch to using stored procedures. "johnston" <jo******@thot.com> wrote in message news:3f***********************@newscene.com... We have over 100 asp pages that reference a table (distribution_components). We added a new column and primary key to that table, so now we have to modify the where clause to include that column (we have to make the new
column = to a session variable in the page)
The table appears 531 times in our code. Is there some util or
method that allows us to change it globally, other than going to each occurrance, and adding the new column to the where clause
> I disagree. A good time to switch to using stored procedures is before you've written 531 sql statements in your code.
Well, given the lack of a time machine, this is probably the best time
*possible*. :-)
you can do a search and replace in dreamweaver through the current doc, a
particular folder, or your whole site.
or you could read in your ASP docs using fso and use a regular expression to
append to your SQL. you don't mention whether the 531 statements are exactly
the same
i'm not knocking you, but why are there 100 pages featuring an instance of
the same table? are you not passing values to it to return the required
results? if the table is identical, you could just supply that table as a
SSI, and then you'd only have had to update the SQL once.
for the future, maybe you should just stick with a SELECT * in your SQL till
you get your database design stabilised
good luck
Jason
"Ray at <%=sLocation%>" <as*@me.forit> wrote in message
news:u9**************@TK2MSFTNGP11.phx.gbl... Or at least use a function to return an array of your data every place you need it 531 times. Good lord. I don't mean this to sound rude johnston, really, but let this be a lesson to you.
Ray at work
"TomB" <sh*****@hotmail.com> wrote in message news:Oa**************@tk2msftngp13.phx.gbl... I disagree.
A good time to switch to using stored procedures is before you've
written 531 sql statements in your code.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:OT**************@TK2MSFTNGP12.phx.gbl... This might be a good time to switch to using stored procedures. "johnston" <jo******@thot.com> wrote in message news:3f***********************@newscene.com... > We have over 100 asp pages that reference a table (distribution_components). > We added a new column and primary key to that table, so now we have
to modify > the where clause to include that column (we have to make the new column = to a > session variable in the page) > > The table appears 531 times in our code. Is there some util or method that > allows us to change it globally, other than going to each
occurrance, and > adding the new column to the where clause
On 16 Jul 2003 08:17:11 -0500, jo******@thot.com (johnston) wrote: We have over 100 asp pages that reference a table (distribution_components). We added a new column and primary key to that table, so now we have to modify the where clause to include that column (we have to make the new column = to a session variable in the page)
The table appears 531 times in our code. Is there some util or method that allows us to change it globally, other than going to each occurrance, and adding the new column to the where clause
Global search and replace in your favorite code editor...
Jeff
===================================
Jeff Cochran (IIS MVP) jc*************@naplesgov.com - Munged of Course
I don't get much time to respond to direct email,
so posts here will have a better chance of getting
an answer. Besides, everyone benefits here.
Suggested resources: http://www.iisfaq.com/ http://www.iisanswers.com/ http://www.iistoolshed.com/ http://securityadmin.info/ http://www.aspfaq.com/ http://support.microsoft.com/
====================================
In article <u9**************@TK2MSFTNGP11.phx.gbl>, "Ray at <%=sLocation%>" <as*@me.forit> wrote: Or at least use a function to return an array of your data every place you need it 531 times. Good lord. I don't mean this to sound rude johnston, really, but let this be a lesson to you.
Ray at work
"TomB" <sh*****@hotmail.com> wrote in message news:Oa**************@tk2msftngp13.phx.gbl... I disagree.
A good time to switch to using stored procedures is before you've written 531 sql statements in your code.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:OT**************@TK2MSFTNGP12.phx.gbl... > This might be a good time to switch to using stored procedures. > > > > "johnston" <jo******@thot.com> wrote in message > news:3f***********************@newscene.com... > > We have over 100 asp pages that reference a table > (distribution_components). > > We added a new column and primary key to that table, so now we have to > modify > > the where clause to include that column (we have to make the newcolumn = > to a
i have an oracle background and came to the group that does asp programming.
I have been telling anybody that will listen that we should not use naked sql
in our asp pages, it should be done via a stored procedure.
It is either
stored procedures are for backend stuff not frontend
or
great idea, but this project is too small or deadline is too close, too much
time to develop them, we will surely use it next project, which of course is
also too small or deadline is too close
> > session variable in the page) > > > > The table appears 531 times in our code. Is there some util or method > that > > allows us to change it globally, other than going to each occurrance, and > > adding the new column to the where clause > >
"johnston" <jo******@thot.com> wrote in message
news:3f***********************@newscene.com... We have over 100 asp pages that reference a table
(distribution_components). We added a new column and primary key to that table, so now we have to
modify the where clause to include that column (we have to make the new
column = to a session variable in the page)
The table appears 531 times in our code. Is there some util or
method that allows us to change it globally, other than going to each occurrance,
and adding the new column to the where clause
WARNING: The following is only suggested for this particular
circumstance. As you have heard from others, a stored procedure would
have been the preferred way to handle this.
That being said, another option available to you is to the following:
1. Call the new table distribution_components_new
2. Create a view/saved query called distribution_table based on the new
table which reproduces the old table with the appropriate where clause
applied.
I don't know what the session variable is but I suspect it's something
available from the database. Could you provide some more details?
In article <eu**************@TK2MSFTNGP10.phx.gbl>, "Chris Hohmann" <hohmannATyahooDOTcom> wrote: That being said, another option available to you is to the following:
1. Call the new table distribution_components_new 2. Create a view/saved query called distribution_table based on the new table which reproduces the old table with the appropriate where clause applied.
I don't know what the session variable is but I suspect it's something available from the database. Could you provide some more details?
the session variable is from the web page, its not in the database.
"johnston" <jo******@thot.com> wrote in message
news:3f***********************@newscene.com... In article <eu**************@TK2MSFTNGP10.phx.gbl>, "Chris Hohmann"
<hohmannATyahooDOTcom> wrote: That being said, another option available to you is to the following:
1. Call the new table distribution_components_new 2. Create a view/saved query called distribution_table based on the new table which reproduces the old table with the appropriate where clause applied.
I don't know what the session variable is but I suspect it's something available from the database. Could you provide some more details?
the session variable is from the web page, its not in the database.
What is it? When is it created? Can it be stored in the database? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jon Maz |
last post by:
Hi All,
I've just noticed that there seem to be two ways of setting up a global.asax
file.
At http://www.csharphelp.com/archives/archive206.html the global.asax
example has Application_Start...
|
by: Faisal |
last post by:
Hi.
I'm in the process of moving an application from ASP to ASP.NET, & I'm
writing in VB, using VS.NET. I'm new to the .NET framework & have a
basic question regarding static objects defined in...
|
by: BB |
last post by:
Hello all,
I might be missing something here, but am trying to understand the difference between using application-level variables--i.e. Application("MyVar")--and global variables--i.e. public...
|
by: fd123456 |
last post by:
Hi Tom !
Sorry about the messy quoting, Google is playing tricks on me at the
moment.
> Global.asax is where you normally have the Global Application
> and Session variables and code to...
|
by: John M |
last post by:
Hello,
On Microsoft Visual Studio .NET 2003,
I want to use some global elements,
that can be used in each one of my pages.
i.e I put a oleDBConnection on global.asax.vb
How can I use it...
|
by: Alan Silver |
last post by:
Hello,
I have spent ages trawling through Google, looking for information about
global functions in ASP.NET and I'm still not clear about the best way
to go about this (or not).
I am writing...
|
by: Thomas Coleman |
last post by:
Ok, I've obviously discovered that Global.aspx has been completely changed in
..NET 2.0. However, I haven't figured out how to declare a constant that's
available to any page in my application...
|
by: Grant Merwitz |
last post by:
Hi
Is there a way to add a control to my page through the Global.asax
I would like to place this code in the Session_Start page so its only added
to the first page the user visits.
TIA
|
by: P K |
last post by:
Hi,
I have an Enum which I need to use in many pages and many classes written in
asp.net 2.0
I would like to have a central repository for the enum so that changes can
be made once. Also I would...
|
by: Steve |
last post by:
I am new to this newsgroup & to .NET in general. I have been playing around
with Visual Studio .NET, building and rendering web pages using VB "code
behind" files. My problem / question is;
How...
|
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...
|
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: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
| |