Zooflow: new search form
This commit is contained in:
@@ -225,7 +225,7 @@ Public Class MSSQLServer
|
||||
''' </summary>
|
||||
''' <param name="Connection"></param>
|
||||
''' <returns></returns>
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Private Function OpenSQLConnection(Connection As SqlConnection) As SqlConnection
|
||||
If Connection.State = ConnectionState.Closed Then
|
||||
Connection.Open()
|
||||
@@ -234,12 +234,12 @@ Public Class MSSQLServer
|
||||
Return Connection
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Private Function GetSQLConnection() As SqlConnection
|
||||
Return GetConnection(CurrentSQLConnectionString)
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Private Function GetConnection(ConnectionString As String) As SqlConnection
|
||||
Try
|
||||
Dim oConnection As New SqlConnection(ConnectionString)
|
||||
@@ -272,7 +272,7 @@ Public Class MSSQLServer
|
||||
End Try
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Public Function GetDatatable(SqlCommand As String) As DataTable Implements IDatabase.GetDatatable
|
||||
Return GetDatatable(SqlCommand, _Timeout)
|
||||
End Function
|
||||
@@ -282,33 +282,33 @@ Public Class MSSQLServer
|
||||
''' </summary>
|
||||
''' <param name="SqlCommand">sqlcommand for datatable (select XYZ from TableORView)</param>
|
||||
''' <returns>Returns a datatable</returns>
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Public Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable Implements IDatabase.GetDatatable
|
||||
Using oSqlConnection = GetSQLConnection()
|
||||
Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.WithTransaction, Nothing, Timeout)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Public Function GetDatatable(SqlCommand As String, Transaction As SqlTransaction, Optional Timeout As Integer = 120) As DataTable
|
||||
Using oSqlConnection = GetSQLConnection()
|
||||
Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.ExternalTransaction, Transaction, Timeout)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Public Async Function GetDatatableAsync(SqlCommand As String, Optional Timeout As Integer = 120) As Task(Of DataTable)
|
||||
Return Await Task.Run(Function() GetDatatable(SqlCommand, Timeout))
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Public Function GetDatatableWithConnection(SqlCommand As String, ConnectionString As String, Optional Timeout As Integer = 120) As DataTable
|
||||
Using oConnection = GetConnection(ConnectionString)
|
||||
Return GetDatatableWithConnectionObject(SqlCommand, oConnection, Timeout:=Timeout)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough()>
|
||||
'<DebuggerStepThrough()>
|
||||
Public Function GetDatatableWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection,
|
||||
Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction,
|
||||
Optional Transaction As SqlTransaction = Nothing,
|
||||
|
||||
Reference in New Issue
Block a user