Groups | Blog | Home
all groups > sql server clients > february 2007 >

sql server clients : sql connection close problem (with vb.net lang)


Agnes
2/23/2007 12:00:00 AM
During form Load, I want to fill in the dataset and the close the connection
at once. However, In SQL Server, I still find that the connection exists and
the status is "AWAITING COMMAND". My client 's IT admin complaint that this
connection should be disappear.
I really got no idea about SQL admin Please help ~~
Try
dsGLJnHeader.Clear()
daGLJnHeader.SelectCommand = New SqlCommand
daGLJnHeader.TableMappings.Add("Table", "GLJnHeader")
daGLJnHeader.SelectCommand.CommandText = "select " &
strSQLData_H & " from GLJnHeader " & strSQLwhere & " ORDER BY voucherno desc
"
daGLJnHeader.SelectCommand.Connection =
dtsclass.DatabaseConnection.GetDbConnection("ACCOUNT")
daGLJnHeader.Fill(dsGLJnHeader, "GLJnHeader")

Catch err As Exception
MessageBox.Show(err.Message, "Form Load-Fille-GlJnHeader")
Finally
daGLJnHeader.close
end try

Sue Hoegemeier
2/25/2007 2:31:35 PM
You should first check if connection pooling/session pooling
is enabled. The client can also check if sp_reset_connection
is firing for these connection - that's used by connection
pooling.

-Sue

On Fri, 23 Feb 2007 10:32:30 +0800, "Agnes"
[quoted text, click to view]
AddThis Social Bookmark Button