Im running some pretty straight forward code.
Mainly database access (SQL7) doing inserts and sometimes when the script
runs it halts the IIS service dead in its tracks. Before the page can even
finish loading.
the error seems to be caused when i introduced this section of code into the
page.
sub SaveIDC( rec2Save )
'# Local variable declarations
Dim myLocalArr
Dim szIDCID
Dim szIndividualID
Dim rsQJIndInfo
'# Perform the value extractions from the CSV record.
myLocalArr = breakString( rec2save, "SR" )
'# get the individual id from the QJIndInfo table based on the QJ User ID.
set rsQJIndInfo = server.CreateObject("ADODB.Recordset")
rsQJIndInfo.Open "select * from QJIndInfo where QJUserID = '" &
myLocalArr(12) & "'", conn, 1, 3
if rsQJIndInfo.RecordCount > 0 then
szIndividualID = rsQJIndInfo("Individual_ID")
else
szIndividualID = myLocalArr(12)
end if
szIDCID = replace(myLocalArr(64), " ", "" ) & "_" & myLocalArr(12) & "-" &
myLocalArr(13) & "_" & formatdatetime(now(),2)& formatdatetime(now(),3)
'# Insert the ID card
Response.Write " <li>Inserting ID Card " & myLocalArr(12) & "...<br>"
Conn.execute "insert into IDC (IDC_ID, CardNumber, Type, DateIssued,
IssuingNLC, ExpiryDate, CreationEditDate, IsQwizz ) values ('" & szIDCID &
"','" & replace(myLocalArr(64), " ", "" ) & "','PIDC','" & REPLACE(
myLocalArr(65), "-", "/" ) & "','0000','','" & formatdatetime(now(),2) &
"',-1 )"
'# Create the Ind_tic_idc record with null ticket ref
Conn.execute "insert into Ind_Tic_IDC ( Individual_ID, Ticket_ID, IDC_ID )
values ('" & szIndividualID & "','NULL','" & szIDCID & "')"
'# Create the Ind_tic_idc record with ticket ref
Conn.execute "insert into Ind_Tic_IDC ( Individual_ID, Ticket_ID, IDC_ID )
values ('" & szIndividualID & "','" & szGlobalTic_ID & "','" & szIDCID &
"')"
'Update Audit Trail
conn.execute "insert into AuditTrail
(User_ID,NLC_ID,Operation,CreationEditDate) values ('QJ_USER','Q" &
myLocalArr(13) & "','Create IDCARD " & szIDCID & "','" & formatdatetime(
now(), 2 ) & " " & formatdatetime( now(), 3 ) & "')"
end sub
As you can see, pretty straight forward.
It seems to stop the service about 50% of the time its run.
Can anyone shed any light.
Thanks
Stewert