![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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("ACCOU NT") daGLJnHeader.Fill(dsGLJnHeader, "GLJnHeader") Catch err As Exception MessageBox.Show(err.Message, "Form Load-Fille-GlJnHeader") Finally daGLJnHeader.close end try |
![]() |
| Thread Tools | |
| Display Modes | |
| |