Hello,
I had the following code working fine until it just decided to stop working. I get a system low on virtual memory message. I increased this and then I get a timed out error message. This was working perfectly before and now works like crap.
The only solace that I have is that if I remove the table html, it does return the number of records, so I feel it has to do with the loop.
Any help is much appreciated!
Thanks
Jesse
<%@ Language=VBScript %>
<%
'This sample provides the basic steps to connect to
'an MSAccess database and view the records.
Dim conn
Dim rs
Dim strConn
Dim strSQL
Dim appNumb
Dim SQLstr
Dim lnNumb
Dim BorrLName
appNumb = Request.Form("txtAppNumb"
lnNumb = Request.Form("txtLoanNumber"
BorrLName = Request.Form("txtBorrLName"
' used to isolate null strings
Select Case appNumb
Case ""
AppNumb = "*"
Case Else
AppNumb = AppNumb
End Select
Select Case lnNumb
Case ""
lnNumb = "*"
Case Else
lnNumb = lnNumb
End Select
Select Case BorrLName
Case ""
AppNumb = "*"
Case Else
BorrLName = BorrLName
End Select
strSQL = "SELECT tbl1Master.[1ApplNumb], tbl1Master.LoanNumber, tbl1Master.Borr1LastName, tbl1Master.ProcessorCode, tblDisposition.StateCode, tblDisposition.TypeCode, tblDisposition.CostCenterCode, tbl2Status.CurrentStatus, tbl2Status.CurrentDate, tbl1Master.InvestorCode, tbl1Master.NoteAmount, tbl1Master.NoteRate, tbl1Master.OriginatorCode, tbl1Master.LoanWrittenBy, tbl1Master.PropertyState, tbl1Master.DocType, tbl3HudLines.[801], tbl3HudLines.[802], tbl3HudLines.[808], tblDisposition.[Wholesale/Retail], tblDisposition.[Conforming/Non-Conforming] "& _
"FROM ((tbl1Master INNER JOIN tbl2Status ON tbl1Master.[1ApplNumb] = tbl2Status.[2ApplNumb]) INNER JOIN tbl3HudLines ON tbl2Status.[2ApplNumb] = tbl3HudLines.[3ApplNumb]) INNER JOIN tblDisposition ON tbl3HudLines.[3ApplNumb] = tblDisposition.[1ApplNumb] "& _
"WHERE tbl1Master.[1ApplNumb] like '%" & appNumb & "%' and tbl1Master.[LoanNumber] like '%" & lnNumb & "%' and tbl1Master.[Borr1LastName] like '%" & BorrLName & "%'"
'Create the object. In this case Connection to a database
Set Conn = Server.CreateObject("ADODB.Connection"
'Select the provider
Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
'Select the data source.
Conn.ConnectionString = "Data Source=C:\Inetpub\
'Open the connection
Conn.Open
'Create a recordset object
Set Rs = Server.CreateObject("ADODB.Recordset"
'Open the recordset with the connection created earlier
Rs.Open strSQL,Conn, 1,3
%>
You Have Returned <%Response.write rs.RecordCount%> Records
<br><br>
<%
'Loop thru the records
do while not rs.EOF
%>
<hr>
<table border="1" width="643" height="274">
<tr>
<td width="120" height="34" align="right">App Number:</td>
<td width="166" height="34"> <% Response.Write rs("1ApplNumb"
%></td>
<td width="169" height="34" align="right"><b>Type Code:</b></td>
<td width="160" height="34" align="left"> <% Response.Write rs("TypeCode"
%></td>
</tr>
<tr>
<td width="120" height="34" align="right">Loan Number:</td>
<td width="166" height="34"> <% Response.Write rs("LoanNumber"
%></td>
<td width="169" height="34" align="right"><b>Cost Center Code:</b></td>
<td width="160" height="34" align="left"> <% Response.Write rs("CostCenterCode"
%></td>
</tr>
<tr>
<td width="120" height="34" align="right">Borr Last Name:</td>
<td width="166" height="34"> <% Response.Write rs("Borr1LastName"
%></td>
<td width="169" height="34" align="right"><b>Product Code:</b></td>
<td width="160" height="34" align="left"> <% Response.Write rs("StateCode"
%></td>
</tr>
<tr>
<td width="120" height="34" align="right">Investor Code:</td>
<td width="166" height="34"> <% Response.Write rs("InvestorCode"
%></td>
<td width="169" height="34" align="right">Processor Code:</td>
<td width="160" height="34"> <% Response.Write rs("ProcessorCode"
%></td>
</tr>
<tr>
<td width="120" height="34" align="right">Property State:</td>
<td width="166" height="34"> <% Response.Write rs("PropertyState"
%></td>
<td width="169" height="34" align="right">Originator Code:</td>
<td width="160" height="34"> <% Response.Write rs("OriginatorCode"
%></td>
</tr>
<tr>
<td width="120" height="34" align="right">Wholesale / Retail:</td>
<td width="166" height="34"> <% Response.Write rs("Wholesale/Retail"
%></td>
<td width="169" height="34" align="right">Current Status:</td>
<td width="160" height="34"> <% Response.Write rs("CurrentStatus"
%></td>
</tr>
<tr>
<td width="120" height="34" align="right">Conforming?:</td>
<td width="166" height="34"> <% Response.Write rs("Conforming/Non-Conforming"
%></td>
<td width="169" height="34" align="right">Current Date:</td>
<td width="160" height="34"> <% Response.Write rs("CurrentDate"
%></td>
</tr>
</table>
<hr>
<%
loop
'Remove the Connection and Recordset
set Rs = nothing
set Conn = nothing
%>
</script>
I had the following code working fine until it just decided to stop working. I get a system low on virtual memory message. I increased this and then I get a timed out error message. This was working perfectly before and now works like crap.
The only solace that I have is that if I remove the table html, it does return the number of records, so I feel it has to do with the loop.
Any help is much appreciated!
Thanks
Jesse
<%@ Language=VBScript %>
<%
'This sample provides the basic steps to connect to
'an MSAccess database and view the records.
Dim conn
Dim rs
Dim strConn
Dim strSQL
Dim appNumb
Dim SQLstr
Dim lnNumb
Dim BorrLName
appNumb = Request.Form("txtAppNumb"
lnNumb = Request.Form("txtLoanNumber"
BorrLName = Request.Form("txtBorrLName"
' used to isolate null strings
Select Case appNumb
Case ""
AppNumb = "*"
Case Else
AppNumb = AppNumb
End Select
Select Case lnNumb
Case ""
lnNumb = "*"
Case Else
lnNumb = lnNumb
End Select
Select Case BorrLName
Case ""
AppNumb = "*"
Case Else
BorrLName = BorrLName
End Select
strSQL = "SELECT tbl1Master.[1ApplNumb], tbl1Master.LoanNumber, tbl1Master.Borr1LastName, tbl1Master.ProcessorCode, tblDisposition.StateCode, tblDisposition.TypeCode, tblDisposition.CostCenterCode, tbl2Status.CurrentStatus, tbl2Status.CurrentDate, tbl1Master.InvestorCode, tbl1Master.NoteAmount, tbl1Master.NoteRate, tbl1Master.OriginatorCode, tbl1Master.LoanWrittenBy, tbl1Master.PropertyState, tbl1Master.DocType, tbl3HudLines.[801], tbl3HudLines.[802], tbl3HudLines.[808], tblDisposition.[Wholesale/Retail], tblDisposition.[Conforming/Non-Conforming] "& _
"FROM ((tbl1Master INNER JOIN tbl2Status ON tbl1Master.[1ApplNumb] = tbl2Status.[2ApplNumb]) INNER JOIN tbl3HudLines ON tbl2Status.[2ApplNumb] = tbl3HudLines.[3ApplNumb]) INNER JOIN tblDisposition ON tbl3HudLines.[3ApplNumb] = tblDisposition.[1ApplNumb] "& _
"WHERE tbl1Master.[1ApplNumb] like '%" & appNumb & "%' and tbl1Master.[LoanNumber] like '%" & lnNumb & "%' and tbl1Master.[Borr1LastName] like '%" & BorrLName & "%'"
'Create the object. In this case Connection to a database
Set Conn = Server.CreateObject("ADODB.Connection"
'Select the provider
Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
'Select the data source.
Conn.ConnectionString = "Data Source=C:\Inetpub\
'Open the connection
Conn.Open
'Create a recordset object
Set Rs = Server.CreateObject("ADODB.Recordset"
'Open the recordset with the connection created earlier
Rs.Open strSQL,Conn, 1,3
%>
You Have Returned <%Response.write rs.RecordCount%> Records
<br><br>
<%
'Loop thru the records
do while not rs.EOF
%>
<hr>
<table border="1" width="643" height="274">
<tr>
<td width="120" height="34" align="right">App Number:</td>
<td width="166" height="34"> <% Response.Write rs("1ApplNumb"
<td width="169" height="34" align="right"><b>Type Code:</b></td>
<td width="160" height="34" align="left"> <% Response.Write rs("TypeCode"
</tr>
<tr>
<td width="120" height="34" align="right">Loan Number:</td>
<td width="166" height="34"> <% Response.Write rs("LoanNumber"
<td width="169" height="34" align="right"><b>Cost Center Code:</b></td>
<td width="160" height="34" align="left"> <% Response.Write rs("CostCenterCode"
</tr>
<tr>
<td width="120" height="34" align="right">Borr Last Name:</td>
<td width="166" height="34"> <% Response.Write rs("Borr1LastName"
<td width="169" height="34" align="right"><b>Product Code:</b></td>
<td width="160" height="34" align="left"> <% Response.Write rs("StateCode"
</tr>
<tr>
<td width="120" height="34" align="right">Investor Code:</td>
<td width="166" height="34"> <% Response.Write rs("InvestorCode"
<td width="169" height="34" align="right">Processor Code:</td>
<td width="160" height="34"> <% Response.Write rs("ProcessorCode"
</tr>
<tr>
<td width="120" height="34" align="right">Property State:</td>
<td width="166" height="34"> <% Response.Write rs("PropertyState"
<td width="169" height="34" align="right">Originator Code:</td>
<td width="160" height="34"> <% Response.Write rs("OriginatorCode"
</tr>
<tr>
<td width="120" height="34" align="right">Wholesale / Retail:</td>
<td width="166" height="34"> <% Response.Write rs("Wholesale/Retail"
<td width="169" height="34" align="right">Current Status:</td>
<td width="160" height="34"> <% Response.Write rs("CurrentStatus"
</tr>
<tr>
<td width="120" height="34" align="right">Conforming?:</td>
<td width="166" height="34"> <% Response.Write rs("Conforming/Non-Conforming"
<td width="169" height="34" align="right">Current Date:</td>
<td width="160" height="34"> <% Response.Write rs("CurrentDate"
</tr>
</table>
<hr>
<%
loop
'Remove the Connection and Recordset
set Rs = nothing
set Conn = nothing
%>
</script>