I am using VB.net 2015 and I am able to communicate with my sqlite database in remote mode. but every time I call the function GetField seems to allocate a lot of memory and I am not able to release it.
I try to use slsCloseSet(0) but seems not to do anything.
this function from Visual Studio GC.Collect() seems to help a litle bit but still memory continue increasing as much as I use the GetField function.
Any Idea about this problem.
Here is my code in VB.net
by the way excellent product overall.
Public Function GetDataTable(ByVal Statement As String, ByVal rsMode As String, Optional ByRef bNothing As Boolean = False) As DataTable
If isConnected = False Then
Throw New Exception("no connection, connect first")
End If
Dim dt As New DataTable
Dim ColCount As Integer
Dim as1 As Long
Dim swert() As String
Dim zaehler As Integer
Dim sFieldName As String
Dim sFieldValue As String
'slsSetProcessMods("E0T5")
rsMode = ""
as1 = slsSel(Statement, 0, rsMode)
ColCount = Convert.ToInt32(ColumnCount(0))
ReDim swert(ColCount - 1)
Do While slsGetRow(0, "") > 0
zaehler += 1
For i As Integer = 1 To ColCount
sFieldName = slsGetColumnName(i, 0).ToString
sFieldValue = GetField(sFieldName)
If zaehler = 1 Then
dt.Columns.Add(sFieldName)
End If
If sFieldValue = "" Then
swert(i - 1) = ""
Else
swert(i - 1) = sFieldValue
End If
Next
dt.Rows.Add(swert)
Loop
slsCloseSet(0)
GC.Collect()
Return dt
End Function
End Class
I try to use slsCloseSet(0) but seems not to do anything.
this function from Visual Studio GC.Collect() seems to help a litle bit but still memory continue increasing as much as I use the GetField function.
Any Idea about this problem.
Here is my code in VB.net
by the way excellent product overall.
Public Function GetDataTable(ByVal Statement As String, ByVal rsMode As String, Optional ByRef bNothing As Boolean = False) As DataTable
If isConnected = False Then
Throw New Exception("no connection, connect first")
End If
Dim dt As New DataTable
Dim ColCount As Integer
Dim as1 As Long
Dim swert() As String
Dim zaehler As Integer
Dim sFieldName As String
Dim sFieldValue As String
'slsSetProcessMods("E0T5")
rsMode = ""
as1 = slsSel(Statement, 0, rsMode)
ColCount = Convert.ToInt32(ColumnCount(0))
ReDim swert(ColCount - 1)
Do While slsGetRow(0, "") > 0
zaehler += 1
For i As Integer = 1 To ColCount
sFieldName = slsGetColumnName(i, 0).ToString
sFieldValue = GetField(sFieldName)
If zaehler = 1 Then
dt.Columns.Add(sFieldName)
End If
If sFieldValue = "" Then
swert(i - 1) = ""
Else
swert(i - 1) = sFieldValue
End If
Next
dt.Rows.Add(swert)
Loop
slsCloseSet(0)
GC.Collect()
Return dt
End Function
End Class