C
crjunk
I was asked to update an ASP web page that is executed by an ASP.NET
aspx web form. I have no control over modifying the ASPX page, so I
cannot see any meaningful error message from my ASP page that could
help determin what is going on.
The following code will delete any existing records from a Progress
Database and then add the records back to the Progress Database from
an XML file.
My code successfully deletes the records, but as soon as it deletes the
records, it crashes. I'm not sure what I'm doing wrong. Can anyone
help guide me in the right directions?
Thanks,
crjunk
<%@ Language=VBScript %>
<%
Response.Expires = -1000
Response.ContentType = "text/xml"
dim xRequestDOM, iLoadErr, iParseErr
set xRequestDom = Server.CreateObject("MSXML.FreeThreadedDomDocument")
iLoadErr = xRequestDom.load(Request)
iParseErr = xRequestDom.parseError.errorCode
if iLoadErr <> 0 and iParseErr = 0 then
'**** Constants copied
Const
CONNECTIONSTRING="DSN=SHREDTEST;uid=sysprogress;pwd=sysprogress"
Const adOpenKeyset = 1
Const adLockPessimistic = 2
Const adCmdText = &H0001
sSQL = "Delete from pub.companies where agencyid = " & sAgencyCode
Set oRecordset = Server.CreateObject("ADODB.Recordset")
''THE CODE CRASHES AFTER IT RUNS THE UPCOMING oRecordset.OPEN
STATEMENT
oRecordset.Open sSQL, CONNECTIONSTRING, adOpenKeyset,
adLockPessimistic, adCmdText
''THE CODE HAS NOW DELETED THE RECORD, BUT HAS CRASHED.
oRecordSet.Update
oRecordset.Close
Set oRecordset = Nothing
''THE REST OF THE CODE WAS OMITTED FROM THIS NEWSGROUP POST. THE
OMITTED CODE GOES ON TO ADD THE RECORDS FROM THE XML FILE BACK TO THE
TABLE THAT THEY WERE JUST DELETED FROM.
end if
%>
aspx web form. I have no control over modifying the ASPX page, so I
cannot see any meaningful error message from my ASP page that could
help determin what is going on.
The following code will delete any existing records from a Progress
Database and then add the records back to the Progress Database from
an XML file.
My code successfully deletes the records, but as soon as it deletes the
records, it crashes. I'm not sure what I'm doing wrong. Can anyone
help guide me in the right directions?
Thanks,
crjunk
<%@ Language=VBScript %>
<%
Response.Expires = -1000
Response.ContentType = "text/xml"
dim xRequestDOM, iLoadErr, iParseErr
set xRequestDom = Server.CreateObject("MSXML.FreeThreadedDomDocument")
iLoadErr = xRequestDom.load(Request)
iParseErr = xRequestDom.parseError.errorCode
if iLoadErr <> 0 and iParseErr = 0 then
'**** Constants copied
Const
CONNECTIONSTRING="DSN=SHREDTEST;uid=sysprogress;pwd=sysprogress"
Const adOpenKeyset = 1
Const adLockPessimistic = 2
Const adCmdText = &H0001
sSQL = "Delete from pub.companies where agencyid = " & sAgencyCode
Set oRecordset = Server.CreateObject("ADODB.Recordset")
''THE CODE CRASHES AFTER IT RUNS THE UPCOMING oRecordset.OPEN
STATEMENT
oRecordset.Open sSQL, CONNECTIONSTRING, adOpenKeyset,
adLockPessimistic, adCmdText
''THE CODE HAS NOW DELETED THE RECORD, BUT HAS CRASHED.
oRecordSet.Update
oRecordset.Close
Set oRecordset = Nothing
''THE REST OF THE CODE WAS OMITTED FROM THIS NEWSGROUP POST. THE
OMITTED CODE GOES ON TO ADD THE RECORDS FROM THE XML FILE BACK TO THE
TABLE THAT THEY WERE JUST DELETED FROM.
end if
%>