G
Guest
When I use the following code in VB.NET :
Public Function test() As String
Try
Dim da1 As OdbcDataAdapter
Dim i As Int32
Dim tfem As DataTable
For i = 0 To 1000
da1 = New OdbcDataAdapter("select * from TABLE1 where
TABLE1.ID= '16'", "DSN=DSNTEST;UID=UIDTEST;PWD=PWDTEST;")
tfem = New DataTable
tfem.TableName = "TABLE1"
da1.Fill(tfem)
tfem.Dispose()
tfem = Nothing
da1.Dispose()
da1 = Nothing
Next
Catch lerr As Exception
Return lerr.Message
End Try
Return "Ok"
End Function
or this one :
Public Function test1() As String
Try
Dim da1 As OdbcDataAdapter
Dim i As Int32
Dim tfem As DataTable
da1 = New OdbcDataAdapter("select * from TABLE1 where TABLE1.ID=
'16'", "DSN=DSNTEST;UID=UIDTEST;PWD=PWDTEST;")
da1.SelectCommand.CommandTimeout = 0
tfem = New DataTable
tfem.TableName = "TABLE1"
For i = 0 To 1000
da1.Fill(tfem)
tfem.Rows.Clear()
tfem.Reset()
Next
tfem.Dispose()
tfem = Nothing
da1.Dispose()
da1 = Nothing
Catch lerr As Exception
Return lerr.Message
End Try
Return "Ok"
End Function
the memory used by my webservice and/or executable never stop growing until
the webservice and/or executable stop responding...The only solution is to
kill aspnet_wp.exe and/or executable to get back the memory used.
Any suggestions ?
Public Function test() As String
Try
Dim da1 As OdbcDataAdapter
Dim i As Int32
Dim tfem As DataTable
For i = 0 To 1000
da1 = New OdbcDataAdapter("select * from TABLE1 where
TABLE1.ID= '16'", "DSN=DSNTEST;UID=UIDTEST;PWD=PWDTEST;")
tfem = New DataTable
tfem.TableName = "TABLE1"
da1.Fill(tfem)
tfem.Dispose()
tfem = Nothing
da1.Dispose()
da1 = Nothing
Next
Catch lerr As Exception
Return lerr.Message
End Try
Return "Ok"
End Function
or this one :
Public Function test1() As String
Try
Dim da1 As OdbcDataAdapter
Dim i As Int32
Dim tfem As DataTable
da1 = New OdbcDataAdapter("select * from TABLE1 where TABLE1.ID=
'16'", "DSN=DSNTEST;UID=UIDTEST;PWD=PWDTEST;")
da1.SelectCommand.CommandTimeout = 0
tfem = New DataTable
tfem.TableName = "TABLE1"
For i = 0 To 1000
da1.Fill(tfem)
tfem.Rows.Clear()
tfem.Reset()
Next
tfem.Dispose()
tfem = Nothing
da1.Dispose()
da1 = Nothing
Catch lerr As Exception
Return lerr.Message
End Try
Return "Ok"
End Function
the memory used by my webservice and/or executable never stop growing until
the webservice and/or executable stop responding...The only solution is to
kill aspnet_wp.exe and/or executable to get back the memory used.
Any suggestions ?