Проблема нехватки памяти при попытке подключения к базе данных oracle (VB6)
Всем Привет,
when I m trying to set Recordset using oracle connection string, I m getting OUt of memory error. on line "rsLIS.Open sql, gConnLIS, adOpenStatic, adLockReadOnly" here are the things which I tried : instead of directly using recordset, I tried to create array (GetRows) method. Even though recordset count is 26 but UBound of array is showing 1 I have trying changing 3rd argument value from static to forward only in line ""rsLIS.Open sql, gConnLIS, adOpenStatic, adLockReadOnly"" it also didn't work, it was showing recordset.count as 0 Did try after restarting the client system still same I m getting this error on client side and since at my place I don't have development environment to debug Error is "OUT OF MEMORY"
<pre>Public Function GetResults_New(MachName As String, patid As String, bCheckDate As Boolean, SendAssay As Boolean) As ADODB.Recordset On Error GoTo errdesc Call ShowTempMsg("Line 1") Dim bXVar As Boolean Dim i, j As Integer Dim tmplis, tmporder Dim tmpresult bXVar = False Dim rec_result As New ADODB.Recordset Dim rsLink As New ADODB.Recordset Dim rsLIS As New ADODB.Recordset Dim xSampleIdType As String gAppPath = AddEditINIfile("VAHSIF.INI", "IF", "sLinkPath", "") xSampleIdType = AddEditINIfile(gAppPath & "\sLinkConfig.ini", MachName, "SampleIdType", "SampleId1", False) Call Open_Connection Call Open_Connection_LIS rec_result.CursorLocation = adUseClient If SendAssay = True Then rec_result.Fields.Append "machineparamid", adBSTR, 50 rec_result.Fields.Append "Assayno", adBSTR, 50 rec_result.Fields.Append "SType", adBSTR, 50 rec_result.Fields.Append "Dilution", adBSTR, 50 Else rec_result.Fields.Append "machineparamid", adBSTR, 50 rec_result.Fields.Append "SType", adBSTR, 50 rec_result.Fields.Append "Dilution", adBSTR, 50 End If rec_result.Open \ 'Link Query For Mapped Params. sql = "SELECT EquipParamMapping.EquipId, EquipParamMapping.EquipParamCode, EquipParamMapping.LISParamCode, EquipParamMapping.EquipAssayNo from EquipParam, EquipParamMapping where equipParam.equipid = equipparammapping.equipid and equipparam.equipparamcode = equipparammapping.equipparamcode and EquipParam.EquipID = '" & MachName & "' and EquipParam.isProgram = 'Y'" **rsLink.Open sql, gConn, adOpenStatic, adLockReadOnly** If enumConnTo = connOracle Then sql = "select " & xSampleIdType & " , LIS_Param_Code From SL_21CI_View_sampleid_Orders where " & xSampleIdType & " || SuffixCode = '" & patid & "' and isApplicable <> 'N' " Else sql = "select " & xSampleIdType & " , LIS_Param_Code From SL_21CI_View_sampleid_Orders where " & xSampleIdType & " + cast(SuffixCode as varchar(20)) = '" & patid & "' and isApplicable <> 'N' " End If rsLIS.Open sql, gConnLIS, adOpenStatic, adLockReadOnly While Not rsLIS.EOF If bXVar = True Then rsLink.MoveFirst bXVar = False End If While Not rsLink.EOF bXVar = True If rsLink.Fields(2).value = rsLIS.Fields(1).value Then If SendAssay = True Then rec_result.AddNew rec_result("machineparamid") = rsLink.Fields("EquipParamCode") rec_result("Assayno") = rsLink.Fields("EquipAssayNo") rec_result("SType") = " " rec_result("Dilution") = "0" rec_result.Update rec_result.MoveFirst Else rec_result.AddNew rec_result("machineparamid") = rsLink.Fields("EquipParamCode") rec_result("SType") = " " rec_result("Dilution") = "0" rec_result.Update rec_result.MoveFirst End If GoTo NextParam End If rsLink.MoveNext Wend NextParam: rsLIS.MoveNext Wend Set GetResults_New = rec_result Exit Function errdesc: Call InsertIntoLogWithFileName("Transaction.GetResults_New" & vbNewLine & sql & vbNewLine & err.Description & "ErrLine : " & ErrLine) End Function
Что я уже пробовал:
DBA проверил память базы данных и остальное все в порядке.