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

IIS hangs when certain SQL submitted

Does anyone have a suggestion how I could debug this
problem:

1. Data is collected from database and displayed in a form.
2. User updates data and submits it.
3. Submitted data is compared with old data.
4. SQL is generated for changes and put into an array.
5. SQL in the array is executed line by line.

I've copied the code which does the update from a working
page that does something similar. And tested it with a
basic update to be sure. But for some reason when I
submit this sql:

update table set currency = 'USD' where currency = 'GBP'
and company = 'LQ' and supplier_id = 'BCX0926' and
invoice_no = '654664432'

IIS hangs and the browser displays a blank white page. At
this point the whole site becomes unusable until I restart
the IIS Admin service.

I've pasted the sql into Toad and tested it there and it
works fine. Could anyone suggest what the problem is, or
how I could go about debugging it. Normally when I get
errors thet are written to the screen. But in this case,
I dont get anything back at all.

I've even tried creating a bare bones page just to submit
that sql (see below), but even this crashes the server.

TIA,

Colin
<%Option Explicit%>

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

<%

beginPage 'Prints out the basic HTML for start of page

Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.open Session("PROVIDER")
cn.BeginTrans
cn.execute "update table set currency = 'USD' where
currency = 'GBP' and company = 'LQ' and supplier_id
= 'BCX0926' and invoice_no = '654664432'"

If err.number + cn.Errors.Count = 0 Then
response.write "GOOD UPDATE"
Else
response.write "GOOD UPDATE"
End If

finishPage 'Prints out end of page HTML
%>
Jul 19 '05 #1
4 1794
Have you considered using a stored procedure instead of an ad hoc query?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Colin Steadman" <an*******@discussions.microsoft.com> wrote in message
news:2a*****************************@phx.gbl...
Does anyone have a suggestion how I could debug this
problem:

1. Data is collected from database and displayed in a form.
2. User updates data and submits it.
3. Submitted data is compared with old data.
4. SQL is generated for changes and put into an array.
5. SQL in the array is executed line by line.

I've copied the code which does the update from a working
page that does something similar. And tested it with a
basic update to be sure. But for some reason when I
submit this sql:

update table set currency = 'USD' where currency = 'GBP'
and company = 'LQ' and supplier_id = 'BCX0926' and
invoice_no = '654664432'

IIS hangs and the browser displays a blank white page. At
this point the whole site becomes unusable until I restart
the IIS Admin service.

I've pasted the sql into Toad and tested it there and it
works fine. Could anyone suggest what the problem is, or
how I could go about debugging it. Normally when I get
errors thet are written to the screen. But in this case,
I dont get anything back at all.

I've even tried creating a bare bones page just to submit
that sql (see below), but even this crashes the server.

TIA,

Colin
<%Option Explicit%>

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

<%

beginPage 'Prints out the basic HTML for start of page

Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.open Session("PROVIDER")
cn.BeginTrans
cn.execute "update table set currency = 'USD' where
currency = 'GBP' and company = 'LQ' and supplier_id
= 'BCX0926' and invoice_no = '654664432'"

If err.number + cn.Errors.Count = 0 Then
response.write "GOOD UPDATE"
Else
response.write "GOOD UPDATE"
End If

finishPage 'Prints out end of page HTML
%>

Jul 19 '05 #2
Try losing the begin trans and the error check and see what happens.

Set cn = Server.CreateObject("ADODB.Connection")
cn.open Session("PROVIDER")
cn.execute "update table set currency = 'USD' where currency = 'GBP'
and company = 'LQ' and supplier_id = 'BCX0926' and invoice_no =
'654664432'"
cn.close

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Colin Steadman" <an*******@discussions.microsoft.com> wrote in message
news:2a*****************************@phx.gbl...
Does anyone have a suggestion how I could debug this
problem:

1. Data is collected from database and displayed in a form.
2. User updates data and submits it.
3. Submitted data is compared with old data.
4. SQL is generated for changes and put into an array.
5. SQL in the array is executed line by line.

I've copied the code which does the update from a working
page that does something similar. And tested it with a
basic update to be sure. But for some reason when I
submit this sql:

update table set currency = 'USD' where currency = 'GBP'
and company = 'LQ' and supplier_id = 'BCX0926' and
invoice_no = '654664432'

IIS hangs and the browser displays a blank white page. At
this point the whole site becomes unusable until I restart
the IIS Admin service.

I've pasted the sql into Toad and tested it there and it
works fine. Could anyone suggest what the problem is, or
how I could go about debugging it. Normally when I get
errors thet are written to the screen. But in this case,
I dont get anything back at all.

I've even tried creating a bare bones page just to submit
that sql (see below), but even this crashes the server.

TIA,

Colin
<%Option Explicit%>

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

<%

beginPage 'Prints out the basic HTML for start of page

Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.open Session("PROVIDER")
cn.BeginTrans
cn.execute "update table set currency = 'USD' where
currency = 'GBP' and company = 'LQ' and supplier_id
= 'BCX0926' and invoice_no = '654664432'"

If err.number + cn.Errors.Count = 0 Then
response.write "GOOD UPDATE"
Else
response.write "GOOD UPDATE"
End If

finishPage 'Prints out end of page HTML
%>

Jul 19 '05 #3
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message news:<u2**************@TK2MSFTNGP09.phx.gbl>...
Have you considered using a stored procedure instead of an ad hoc query?

No I hadn't. But after reading some of the material on your ASPFAQ
site I'm going to try and find some time to look at this for the
benefits in performance, and to take out some of the complexity in my
pages.

In the meantime, the problem I had so much trouble with on
Thursday/Friday last week appears to have resolved itself. I went in
to demonstrate the problem to a collegue yesterday and found that it
was working!

The person who looks after IIS says he's not changed anything, and
neither has the DBA so I have no idea what changed... I dont know if
I should be relieved or even more concened, but fingers crossed it
will stay fixed.
Colin
Jul 19 '05 #4
"Colin Steadman" <an*******@discussions.microsoft.com> wrote in message news:<2a*****************************@phx.gbl>...
Does anyone have a suggestion how I could debug this
problem:

1. Data is collected from database and displayed in a form.
2. User updates data and submits it.
3. Submitted data is compared with old data.
4. SQL is generated for changes and put into an array.
5. SQL in the array is executed line by line.

I've copied the code which does the update from a working
page that does something similar. And tested it with a
basic update to be sure. But for some reason when I
submit this sql:

update table set currency = 'USD' where currency = 'GBP'
and company = 'LQ' and supplier_id = 'BCX0926' and
invoice_no = '654664432'

IIS hangs and the browser displays a blank white page. At
this point the whole site becomes unusable until I restart
the IIS Admin service.

I've pasted the sql into Toad and tested it there and it
works fine. Could anyone suggest what the problem is, or
how I could go about debugging it. Normally when I get
errors thet are written to the screen. But in this case,
I dont get anything back at all.

I've even tried creating a bare bones page just to submit
that sql (see below), but even this crashes the server.

TIA,

Colin
<%Option Explicit%>

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

<%

beginPage 'Prints out the basic HTML for start of page

Dim cn
Set cn = Server.CreateObject("ADODB.Connection")
cn.open Session("PROVIDER")
cn.BeginTrans
cn.execute "update table set currency = 'USD' where
currency = 'GBP' and company = 'LQ' and supplier_id
= 'BCX0926' and invoice_no = '654664432'"

If err.number + cn.Errors.Count = 0 Then
response.write "GOOD UPDATE"
Else
response.write "GOOD UPDATE"
End If

finishPage 'Prints out end of page HTML
%>


If anyone is interested this problem appears to occur when Toad from
Quest Software has the I'm updating open. Ie when running this
command:

desc table_name

Closing Toad allows the page to run normally.
Jul 19 '05 #5

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

Similar topics

2
by: Jonathan | last post by:
Hi I'm doing a project for school and wrote an applet that makes a socket connection to a server (smae host as webserver) that was setup for this project. In the applet there are 3 buttons and by...
8
by: Don Miller | last post by:
I have an ASP script that is called from a PDF form to process form data. On the last line of the script I have a Response.Redirect "webpage.asp" that leads to another target page with actual HTML....
9
by: LarryR | last post by:
The following XSLT works fine using MSXML 4.0 (e.g I receive a result in about 20 seconds), but effectively hangs in both .NET 1.0 sp2 with the XML hot fix and NET 1.1. My source XML file is...
0
by: persillade | last post by:
I have an ASP.NET website in which if a certain button is clicked, it will enumerate the scheduled tasks on a certain server. I use psexec to call "schtasks /query /fo list" on a remote server and...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
7
by: Bernard Lebel | last post by:
Hello, I'm stumbled at a serious problem, and quite frankly getting desparate. This is a rather long-winded one so I'll try to get straight to the point. I have this Python program, that...
3
by: grpprod | last post by:
Hi all, I am trying to deploy the latest PHP,MySQL and Apache for a new webmail server (My old IMP 3.1 works fine with PHP 4.2.2). Now I have a serious problem which seems unsolved so far. Here...
3
by: nonstopkaran | last post by:
hey i am handling a small application, it is running well. but very rarely it hangs... (i.e) loggin page itself will take more than 10m and the response will be very very slow. config: ...
9
by: somacore | last post by:
I have a winform with a combobox. This combobox's text is set to a value from the database (in this case, a number). In my code I take the number and convert it to the proper text, returning the...
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:
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
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
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
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...
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...
0
agi2029
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,...

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.