473,811 Members | 3,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New Window Kills Browser When Connected to Oracle

I have an ASP page setup for doing maintenance jobs in Oracle.
Clicking a maintenance job spawns a new window (cut down to a small
size with Javascript) and the jobs runs.

Just before processing starts I output a message to the user in this
new window using a span (with an ID) using Response.Flush. This is to
let the user know that processing has started.

After the procedure has completed, I update the span message using its
ID with 'processed' or 'failed' accordingly.

So far so good!

The problem I have is that it only worked during development. This
seems to be because during development I used an example I picked up
from the ASPFAQ site to simulate database activity (ie a 15 second
delay) without actually doing anything using SQLServer:

sleep = 15
cn.open "Provider=sqlol edb;Data Source=SVR;User Id=id;Password= pw"
cn.Execute "WAITFOR DELAY '00:00:" & sleep & "'"

With the above script everything worked great, and I could open three
or four different procedures and have them all running simultaneously.
Just what I wanted!

However when I switched to running the actual procedures Oracle (which
take a couple of minutes) I've found that it will only run one
procedure at a time. And while this one procedure is running I lose
communication with the parent window (the list of jobs) until the
procedure has finished.

Does anyone have any idea what might be causing this? The only
difference (apart from the SQL) between running in live (Oracle) and
simulating activity using SQL Server is the Provider. Could the Oracle
provider be missing something the SQL Server Provider has? And if so,
what might this be and can I get round it?

I've copied an example maintenance job page below.

TIA,

Colin
<%@Language=VBS cript%>
<%Option Explicit%>
<%Session.LCI D = 2057%>

<!-- #INCLUDE FILE="functions .asp" -->
<!-- #INCLUDE FILE="formattin g.asp" -->

<head>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
</head>

<body id="oBody"
style="filter:p rogid:DXImageTr ansform.Microso ft.Fade(duratio n=2);font-weight:bold;fon t-size:10pt;font-family:arial;ta homa">
<div id=messageToUse rTxT
style="backgrou nd-color:3996FF;co lor:ffffff;posi tion: absolute; left:
0; top: 0;">
Processing Receipts...
</div>
<table height="100%" width="100%">
<tr>
<td align=center>Pr ocess Receipts</td>
</tr>
</table>
<%
Response.flush( )

Dim cn
Dim sql
Dim arSQL()
Dim sleep
Dim testing

'Setup SQL
Redim arSQL(2)
arSQL(0) = "begin"
arSQL(1) = " Pacs_Inbound_Ap i.Process_Recei pts;"
arSQL(2) = "end;"

'Setup connection
Set cn = Server.CreateOb ject("ADODB.Con nection")

'RUN AS TEST OR LIVE?
testing = True
'testing = False
If testing Then
'TESTING
Server.ScriptTi meout = 20
sleep = 15
cn.open "Provider=sqlol edb;Data Source=SVR;User Id=id;Password= pw"
cn.commandTimeo ut = 15
cn.Execute "WAITFOR DELAY '00:00:" & sleep & "'"
Else
'LIVE
Server.ScriptTi meout = 600
cn.open "Provider=OraOL EDB.Oracle;Data Source=SVR;User
Id=id;Password= pw"
cn.execute Join(arSQL,"")
End If

'Destroy SQL array
Erase arSQL

If Err.number <> 0 Or cn.Errors.Count <> 0 Then
response.write "<br>" & err.Description
%>
<script language=javasc ript>
// After setting Apply, changes to the oBody object
// are not displayed until Play is called.
oBody.filters[0].Apply();
oBody.style.bac kgroundColor="F FD3D3";
oBody.filters[0].Play();
messageToUserTx T.innerText = ' Processing failed! ';
</script>
<%
Else
%>
<script language=javasc ript>
// After setting Apply, changes to the oBody object
// are not displayed until Play is called.
oBody.filters[0].Apply();
oBody.style.bac kgroundColor="C EFFC2";
oBody.filters[0].Play();
messageToUserTx T.innerText = ' Processing complete! ';
</script>
<%
End If

cn.Close: Set cn = Nothing

%>

</body>
</html>

Jul 22 '05 #1
7 1332
IIRC an ASP session can only have a single script processing at a given
time.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

<co************ @gmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I have an ASP page setup for doing maintenance jobs in Oracle.
Clicking a maintenance job spawns a new window (cut down to a small
size with Javascript) and the jobs runs.

Just before processing starts I output a message to the user in this
new window using a span (with an ID) using Response.Flush. This is to
let the user know that processing has started.

After the procedure has completed, I update the span message using its
ID with 'processed' or 'failed' accordingly.

So far so good!

The problem I have is that it only worked during development. This
seems to be because during development I used an example I picked up
from the ASPFAQ site to simulate database activity (ie a 15 second
delay) without actually doing anything using SQLServer:

sleep = 15
cn.open "Provider=sqlol edb;Data Source=SVR;User Id=id;Password= pw"
cn.Execute "WAITFOR DELAY '00:00:" & sleep & "'"

With the above script everything worked great, and I could open three
or four different procedures and have them all running simultaneously.
Just what I wanted!

However when I switched to running the actual procedures Oracle (which
take a couple of minutes) I've found that it will only run one
procedure at a time. And while this one procedure is running I lose
communication with the parent window (the list of jobs) until the
procedure has finished.

Does anyone have any idea what might be causing this? The only
difference (apart from the SQL) between running in live (Oracle) and
simulating activity using SQL Server is the Provider. Could the Oracle
provider be missing something the SQL Server Provider has? And if so,
what might this be and can I get round it?

I've copied an example maintenance job page below.

TIA,

Colin
<%@Language=VBS cript%>
<%Option Explicit%>
<%Session.LCI D = 2057%>

<!-- #INCLUDE FILE="functions .asp" -->
<!-- #INCLUDE FILE="formattin g.asp" -->

<head>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
</head>

<body id="oBody"
style="filter:p rogid:DXImageTr ansform.Microso ft.Fade(duratio n=2);font-weight:bold;fon t-size:10pt;font-family:arial;ta homa">
<div id=messageToUse rTxT
style="backgrou nd-color:3996FF;co lor:ffffff;posi tion: absolute; left:
0; top: 0;">
Processing Receipts...
</div>
<table height="100%" width="100%">
<tr>
<td align=center>Pr ocess Receipts</td>
</tr>
</table>
<%
Response.flush( )

Dim cn
Dim sql
Dim arSQL()
Dim sleep
Dim testing

'Setup SQL
Redim arSQL(2)
arSQL(0) = "begin"
arSQL(1) = " Pacs_Inbound_Ap i.Process_Recei pts;"
arSQL(2) = "end;"

'Setup connection
Set cn = Server.CreateOb ject("ADODB.Con nection")

'RUN AS TEST OR LIVE?
testing = True
'testing = False
If testing Then
'TESTING
Server.ScriptTi meout = 20
sleep = 15
cn.open "Provider=sqlol edb;Data Source=SVR;User Id=id;Password= pw"
cn.commandTimeo ut = 15
cn.Execute "WAITFOR DELAY '00:00:" & sleep & "'"
Else
'LIVE
Server.ScriptTi meout = 600
cn.open "Provider=OraOL EDB.Oracle;Data Source=SVR;User
Id=id;Password= pw"
cn.execute Join(arSQL,"")
End If

'Destroy SQL array
Erase arSQL

If Err.number <> 0 Or cn.Errors.Count <> 0 Then
response.write "<br>" & err.Description
%>
<script language=javasc ript>
// After setting Apply, changes to the oBody object
// are not displayed until Play is called.
oBody.filters[0].Apply();
oBody.style.bac kgroundColor="F FD3D3";
oBody.filters[0].Play();
messageToUserTx T.innerText = ' Processing failed! ';
</script>
<%
Else
%>
<script language=javasc ript>
// After setting Apply, changes to the oBody object
// are not displayed until Play is called.
oBody.filters[0].Apply();
oBody.style.bac kgroundColor="C EFFC2";
oBody.filters[0].Play();
messageToUserTx T.innerText = ' Processing complete! ';
</script>
<%
End If

cn.Close: Set cn = Nothing

%>

</body>
</html>

Jul 22 '05 #2
Humm, that makes sense. Are there any ways of getting the script to
run in another session to avoid this?

Thanks Mark,

Colin

Jul 22 '05 #3
co************@ gmail.com wrote on 16 dec 2004 in
microsoft.publi c.inetserver.as p.general:
Humm, that makes sense. Are there any ways of getting the script to
run in another session to avoid this?


What makes sense?

This is not email but usenet, so please quote the Q you are answering on.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 22 '05 #4
Not easily. The session cookie is usually associated with the browser
process. In order to get a separate session you need to open the new browser
window in a separate process. There used to be a setting for this in IE 4
(it usually caused problems by NOT sharing sessions between browser
windows).

Would it be possible to have the user select a set of operations to perform
and then run them sequentially?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
<co************ @gmail.com> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
Humm, that makes sense. Are there any ways of getting the script to
run in another session to avoid this?

Thanks Mark,

Colin

Jul 22 '05 #5
>What makes sense?

This is not email but usenet, so please quote the Q you are answering

on.

Your right. I'm posting from the Google Groups beta, and it doesn't
seem to include the original post like the old one used to. There is
probably an option for it somewhere but I cant find it. To quote you
post, I've had to cut and paste into the reply form...

Jul 22 '05 #6
>Would it be possible to have the user select a set of operations to
perform
and then run them sequentially?


Possibly. I'd better talk to the users and see how import this is.

The only other option might be to use ASP to kick off a VBScript and
not wait for it to return... But I've tried this before and had
terrible problems with permissions and never did get it working.
Thanks for posting.

Colin

Jul 22 '05 #7
Other options:

MSMQ (Microsoft Message Queuing) to trigger processing by external program,
then send email back to user or set a flag in a file some where that an ASP
page can check peridically (use refresh metatag, not time delay on server).

Create a batch file in a specific directory to run the job. Have a scheduled
task look for new files and run them. Notify user as above. Should be able
to create a windows service that detects new files in the directory.

Use stored procedures which run asynchronously. I have heard of this for
SQLServer, not sure if it can be done with Oracle.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

<co************ @gmail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Would it be possible to have the user select a set of operations to

perform
and then run them sequentially?


Possibly. I'd better talk to the users and see how import this is.

The only other option might be to use ASP to kick off a VBScript and
not wait for it to return... But I've tried this before and had
terrible problems with permissions and never did get it working.
Thanks for posting.

Colin

Jul 22 '05 #8

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

Similar topics

0
1473
by: new1s.on.sympatico.ca | last post by:
Hey There! Any one have any ideas on how to prevent the DOS window from appearing when executing an Output Assembly (exe) generated using CodeDom? Thanks, Roland
0
1520
by: mad | last post by:
I am new here and don't know if someone has encountered and discussed this problem before. I appreciate any help to this problem. I am building a new Oracle database (8.1.7) and Win 2000/IIS 5 for development. After I moved ASP pages over from another server (also Oracle 8.1.7 and Win 2000/IIS 5), the error occurred when recordset's MoveNext is called. Here is the code: <% Set cmdTemp = Server.CreateObject("ADODB.Command") Set rsProd...
4
1389
by: Mindy Myers | last post by:
I have been working on a web application for a while. All of a sudden, I can only open the project when connected to the Internet. If I'm not connected, I get an error message stating that "a connection to the server could not be established." It is strange because it used to work just fine. Any help would be appreciated! Thanks!
1
1095
by: acool | last post by:
I just plain forgot this setting and I have been all up and down the options and nothing works, any hel is appreciated.
1
9607
by: bbulsara23 | last post by:
Hi, this has been asked so many times before but I cannot get an answer that works. So I'm asking again. I am using .Net 1.1 on a Windows XP Pro.
10
1542
by: David Lee Conley | last post by:
When I open the Data Sources window and create a new data source, everything works fine. But if I have a form showing in the IDE, the Data Sources window becomes disabled and doesn't display any of the database components. Yet, when I switch to code view, I can see everything just fine. Does anyone have any idea why the Data Sources window becomes disabled when I'm viewing forms? TIA.
3
1992
by: bfmcfarlane | last post by:
I have an appication that allows users to upload and download files. This application is only accessed when a user clicks on an "Upload / Download" link from within our main application. A new window is launched asking the user which file he /she wants to download. After the user determines which file to download, the window disappears but the user is provided with the download file dialog box. I have been able to track it down to a...
0
884
by: naveindia81 | last post by:
i have to disable the ctrl+ n or File-->new-->window in browser. please helpme out.
1
2119
by: kaushiki sinha | last post by:
My laptop is not getting connected with modem. When connected it produces error "Host process for Windows services stopped working and was closed". please solve my problem.
0
9607
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
10652
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
10395
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
10408
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
7673
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
6895
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
5561
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...
1
4346
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
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.