C
Colin Steadman
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
%>
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
%>