Can I update Application("So meVariableName" ) on server A in response to user's action on server B? There is no problem in updating the same variable on server B, of course, but we would like both variables to be in sync since users can view the value stored on arbitrary server.
So far I have tried server.execute and server.transer to execute script updating Application("So meVariableName" ) value on server A in response to user's action on server B but these methods didn't work - documentation conformed it.
Is there another, perhaps some creative way of doing it? 9 1930
"Art" <Ar*@discussion s.microsoft.com > wrote in message
news:13******** *************** ***********@mic rosoft.com... Can I update Application("So meVariableName" ) on server A in response to
user's action on server B? There is no problem in updating the same variable
on server B, of course, but we would like both variables to be in sync since
users can view the value stored on arbitrary server. So far I have tried server.execute and server.transer to execute script
updating Application("So meVariableName" ) value on server A in response to
user's action on server B but these methods didn't work - documentation
conformed it. Is there another, perhaps some creative way of doing it?
Store the value in a database.
--
Tom Kaminski IIS MVP http://www.microsoft.com/windowsserv...y/centers/iis/ http://mvp.support.microsoft.com/ http://www.iisfaq.com/ http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS http://www.tryiis.com
Maybe you misunderstood Tom's point. You would only hit the DB when
application_ons tart is fired, e.g. in Global.asa:
Sub Application_OnS tart()
Set conn = CreateObject("A DODB.Connection ")
conn.open "<connectio n string>"
set rs = conn.execute("S ELECT ConstantValue FROM Constants WHERE
ConstantName = 'foo'")
application("fo o") = rs(0)
rs.close: set rs = nothing
conn.close: set conn = nothing
End Sub
-- http://www.aspfaq.com/
(Reverse address to reply.)
"Art" <Ar*@discussion s.microsoft.com > wrote in message
news:6D******** *************** ***********@mic rosoft.com... Tom, Thanks for your help but our point was to avoid hitting the DB.
"Tom Kaminski [MVP]" wrote:
"Art" <Ar*@discussion s.microsoft.com > wrote in message news:13******** *************** ***********@mic rosoft.com... Can I update Application("So meVariableName" ) on server A in response
to user's action on server B? There is no problem in updating the same
variable on server B, of course, but we would like both variables to be in sync
since users can view the value stored on arbitrary server. So far I have tried server.execute and server.transer to execute
script updating Application("So meVariableName" ) value on server A in response
to user's action on server B but these methods didn't work - documentation conformed it. Is there another, perhaps some creative way of doing it?
Store the value in a database.
-- Tom Kaminski IIS MVP http://www.microsoft.com/windowsserv...y/centers/iis/ http://mvp.support.microsoft.com/ http://www.iisfaq.com/ http://www.iistoolshed.com/ - tools, scripts, and utilities for running
IIS http://www.tryiis.com
I think he wants to update he app var dynamically through an asp page on one
server and not require an app restart.
I would suggest putting the new value into a db for when the app does
restart and then using ServerXMLHTTP to hit an update page on the other
server to either change the app var directly or reload all the vars from the
db.
--
Mark Schupp
Head of Development
Integrity eLearning www.ielearning.com
"Aaron [SQL Server MVP]" <te*****@dnartr eb.noraa> wrote in message
news:OG******** ******@TK2MSFTN GP09.phx.gbl... Maybe you misunderstood Tom's point. You would only hit the DB when application_ons tart is fired, e.g. in Global.asa:
Sub Application_OnS tart() Set conn = CreateObject("A DODB.Connection ") conn.open "<connectio n string>" set rs = conn.execute("S ELECT ConstantValue FROM Constants WHERE ConstantName = 'foo'") application("fo o") = rs(0) rs.close: set rs = nothing conn.close: set conn = nothing End Sub
-- http://www.aspfaq.com/ (Reverse address to reply.)
"Art" <Ar*@discussion s.microsoft.com > wrote in message news:6D******** *************** ***********@mic rosoft.com... Tom, Thanks for your help but our point was to avoid hitting the DB.
"Tom Kaminski [MVP]" wrote:
"Art" <Ar*@discussion s.microsoft.com > wrote in message news:13******** *************** ***********@mic rosoft.com... > Can I update Application("So meVariableName" ) on server A in response to user's action on server B? There is no problem in updating the same variable on server B, of course, but we would like both variables to be in sync since users can view the value stored on arbitrary server. > > So far I have tried server.execute and server.transer to execute script updating Application("So meVariableName" ) value on server A in response to user's action on server B but these methods didn't work -
documentation conformed it. > > Is there another, perhaps some creative way of doing it?
Store the value in a database.
-- Tom Kaminski IIS MVP http://www.microsoft.com/windowsserv...y/centers/iis/ http://mvp.support.microsoft.com/ http://www.iisfaq.com/ http://www.iistoolshed.com/ - tools, scripts, and utilities for
running IIS http://www.tryiis.com
Then I don't understand why it can't be in a database. It's not like
hitting a database is going to add noticeable response time to the page,
unless you're using Access and it's connected to your web server via the
floppy drive on a remote PC logged into a VPN over dial-up...
-- http://www.aspfaq.com/
(Reverse address to reply.)
"Mark Schupp" <ms*****@ielear ning.com> wrote in message
news:#e******** ******@TK2MSFTN GP10.phx.gbl... I think he wants to update he app var dynamically through an asp page on
one server and not require an app restart.
I would suggest putting the new value into a db for when the app does restart and then using ServerXMLHTTP to hit an update page on the other server to either change the app var directly or reload all the vars from
the db.
"Aaron [SQL Server MVP]" <te*****@dnartr eb.noraa> wrote in message
news:uk******** ******@TK2MSFTN GP09.phx.gbl... It's not like hitting a database is going to add noticeable response time to the page, unless you're using Access and it's connected to your web server via the floppy drive on a remote PC logged into a VPN over dial-up...
This is going on my wall of quotes, as soon as I get around to having one.
Ray at home
"Ray at <%=sLocation% > [MVP]" <myfirstname at lane34 dot com> wrote in
message news:OZ******** ******@TK2MSFTN GP09.phx.gbl... "Aaron [SQL Server MVP]" <te*****@dnartr eb.noraa> wrote in message news:uk******** ******@TK2MSFTN GP09.phx.gbl... It's not like hitting a database is going to add noticeable response time to the page, unless you're using Access and it's connected to your web server via the floppy drive on a remote PC logged into a VPN over dial-up...
This is going on my wall of quotes, as soon as I get around to having one.
: )
> very expensive to get (no indexes, full table scans
Why are you using poor database design as an excuse for poor application
design? Fix the database! But the problem again is - how do you make sure that Application variable
storing this reference count gets updated throughout all the servers in a
web farm?
I still don't understand the problem. If you update the database and keep
whatever reference count you're talking about in a database, there is no
need to synchronize between all the servers in the farm. It belongs in a
central place for exactly this reason!
-- http://www.aspfaq.com/
(Reverse address to reply.)
Art wrote: Why are you using poor database design as an excuse for poor application design? Fix the database!
If this was up to me then yes, fixing database is the proper course of action. It is, however, something I'm not going to discuss as an option here since, like I said, I don't control it.
I still don't understand the problem. If you update the database and keep whatever reference count you're talking about in a database, there is no need to synchronize between all the servers in the farm. It belongs in a central place for exactly this reason!
Well, that's what we have right now:) On average it takes 2-3 seconds to execute this query (to get the count) + anything else that a page might be doing. More often than not that particular query is the bottleneck in our application. This is done once per page. We suggested that perhaps we could cache the value and requery DB for an upated one at some interval but users said NO - they want to see accurate count. Next thought - let's use Application variable, query for the count at application's start up and then whenever user performs an action which updates the count we just add the code to up the Application variable's value. That's trivial to implement and maintain. The value of this information is also trivial since it's just a count for informative purposes - so it's not like we are going to lose a sale because the count might be off by one (which it would not be anyway). We are trying to shave off 2 seconds per page here! Of course, database needs to be fixed but you have no control over it and you need to come up w/ competetive and/or alternative idea to speed that up - do you have one?
Since you have a web farm, you can't use an Application variable. The count
needs to be stored centrally. How about caching it in a separate table in
your database? You could use triggers to maintain the value.
Or are you unable to even add a new table to your database?
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
I have to agree with Aaron and Bob on this one even though I originally
suggested using a post from the affected server to the others. What if an
action that would change the count takes place one 2 servers
"simultaneously "?
Build the count on app startup and put it in a separate "reference count"
table as Bob suggests. Then perform your updates to that table until the
next app restart.
--
Mark Schupp
Head of Development
Integrity eLearning www.ielearning.com
"Art" <Ar*@discussion s.microsoft.com > wrote in message
news:3C******** *************** ***********@mic rosoft.com... Why are you using poor database design as an excuse for poor application design? Fix the database! If this was up to me then yes, fixing database is the proper course of
action. It is, however, something I'm not going to discuss as an option here
since, like I said, I don't control it. I still don't understand the problem. If you update the database and
keep whatever reference count you're talking about in a database, there is no need to synchronize between all the servers in the farm. It belongs in
a central place for exactly this reason! Well, that's what we have right now:) On average it takes 2-3 seconds to
execute this query (to get the count) + anything else that a page might be
doing. More often than not that particular query is the bottleneck in our
application. This is done once per page. We suggested that perhaps we could cache the value and requery DB for an
upated one at some interval but users said NO - they want to see accurate
count. Next thought - let's use Application variable, query for the count at
application's start up and then whenever user performs an action which
updates the count we just add the code to up the Application variable's
value. That's trivial to implement and maintain. The value of this
information is also trivial since it's just a count for informative
purposes - so it's not like we are going to lose a sale because the count
might be off by one (which it would not be anyway). We are trying to shave off 2 seconds per page here! Of course, database
needs to be fixed but you have no control over it and you need to come up w/
competetive and/or alternative idea to speed that up - do you have one? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: shank |
last post by:
Visually, the page will look somewhat like a spreadsheet. It could have
hundreds of records (rows) displayed. I want to enable the user to edit any
one or any number of records and any fields, then click a save button to
UPDATE the SQL table. I'd like to use stored procedures if possible. How is
this done? Where do I start?
thanks
|
by: Peter |
last post by:
If I want to build a web services application (not web application), what is
the hardware requirement ? Does anyone have the experience?
|
by: bwalke |
last post by:
I am trying to update data in a MS Access table with data from a SQL
2000 table connected by linked servers. Here are the update
statements:
This one Works\\ Update OpenQuery(MII, 'Select * From JobData') Set
ClientName = 'TestTest3', JobPrice = ddtord.to_totdue -- Where
JobNumber = '20047145000'
This does not\\ Update OpenQuery(MII, 'Select * From JobData') Set
ClientName = 'TestTest3', JobPrice = ddtord.to_totdue
|
by: Klemens |
last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and
an update in a local table in one transaction
Do I have to change some settings to get done or ist this not possible by
definition?
Thanks
Klemens
|
by: Ken Cox [Microsoft MVP] |
last post by:
MS has posted this here:
http://www.asp.net/faq/ms03-32-issue.aspx
Fix for: 'Server Application Unavailable' Error after Applying Security Update
for IE
-------------------------------------------------------------------------------
-
| |
by: johnnymack0730 |
last post by:
Hello -
I am currently working on an asp.net application that needs to be able
to update an access table using ExecuteNonQuery method. I have all the
code setup, it runs, there are no errors thrown, yet...nothing is being
updated. The only thing I can see is the ExecuteNonQuery returns 0
when the update is run. Can anyone help please?
Here is some of the code:
|
by: '~=_Slawek_=~' |
last post by:
I have problem with SQL update. Sometimes it can take 2-10 seconds. I need
to make this update every time page is opened - ASYNCHRONOUSLY.
I have read forums, php.net etc about running php code 'in background' after
all data generated is received by user browser. However i cant simply use
it. Nothing works for me, im on a paid server.
I have checked the headers and all content my PHP outputs is zipped and send
compressed by apache...
|
by: TechnoAtif |
last post by:
INSERT AND UPDATE MULTIPLE CHECKBOX DATA USING PHPMYSQL OR JAVASCRIPT
Hi All
I want to check the multiple checkboxes update them after revisiting that page.
I am taking the name as name=type..in the form of array..but on checking it the result in the database simply gives the world 'array'.i want multiple checkboxes to be checked and updated simultaneously..
and the query to insert the checkbox value has to be included along with...
|
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...
|
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...
|
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,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |