I have not done any SQL programming direct but feel I need to as my asp script times out.
I have a table D_Incidents that has a field Updates. The Updates field is an ntext and contains a string of characters. What I need to do is replace a series of = (I originally used as a separator with a <hr> and a CrLf into a <br>
my asp page had the following code
unfortunately this times out no matter what value I enter for Server.ScriptTimeOut
I've search the web and found some examples of syntax for FETCH and REPLACE but not sure how to do my loop.
Any help appreciated.
I have a table D_Incidents that has a field Updates. The Updates field is an ntext and contains a string of characters. What I need to do is replace a series of = (I originally used as a separator with a <hr> and a CrLf into a <br>
my asp page had the following code
Code:
Server.ScriptTimeOut = 6000
strSQL = "SELECT IncidentRef, Updates "
strSQL = strSQL & "FROM D_INCIDENTS"
set rsIncidents = my_Conn.Execute( strSQL)
rsIncidents.movefirst
do until rsIncidents.EOF
strUpdates = rsIncidents("Updates")
InCaseRef = rsIncidents("IncidentRef")
strUpdates = replace(strUpdates,"================================================", "<br><hr>")
strUpdates = replace(strUpdates,chr(13)&chr(10),"<br>")
strSQL1 = "Update D_INCIDENTS"
strSQL1 = strSQL1 & " SET Updates =" & "'" & strUpdate & "'"
strSQL1 = strSQL1 & " WHERE IncidentRef = " & "'" & InCaseRef & "'"
response.Write(strSQL1 & "<br>")
my_Conn.Execute (strSQL1)
rsIncidents.MoveNext
loop
%>
<% set rsIncidents = nothing
rsIncidents.close %>
unfortunately this times out no matter what value I enter for Server.ScriptTimeOut
I've search the web and found some examples of syntax for FETCH and REPLACE but not sure how to do my loop.
Any help appreciated.