ZooFlow: PropertyDialog, ContextMenu, Async Queries in Database
This commit is contained in:
@@ -131,6 +131,12 @@ Public Class MSSQLServer
|
||||
Return GetDatatable(SqlCommand, _Timeout)
|
||||
End Function
|
||||
|
||||
Public Async Function GetDatatableAsync(SqlCommand As String) As Task(Of DataTable)
|
||||
Return Await Task.Run(Function()
|
||||
Return GetDatatable(SqlCommand, _Timeout)
|
||||
End Function)
|
||||
End Function
|
||||
|
||||
Public Function GetDatatableWithConnection(SqlCommand As String, ConnectionString As String) As DataTable
|
||||
Try
|
||||
If TestCanConnect(ConnectionString) = False Then
|
||||
@@ -234,6 +240,12 @@ Public Class MSSQLServer
|
||||
Return GetScalarValue(SQLQuery, _Timeout)
|
||||
End Function
|
||||
|
||||
Public Async Function GetScalarValueAsync(SQLQuery As String) As Task(Of Object)
|
||||
Return Await Task.Run(Function()
|
||||
Return GetScalarValue(SQLQuery, _Timeout)
|
||||
End Function)
|
||||
End Function
|
||||
|
||||
Public Function GetScalarValueWithConnection(SQLCommand As String, ConnectionString As String) As Object
|
||||
Try
|
||||
If TestCanConnect(ConnectionString) = False Then
|
||||
|
||||
Reference in New Issue
Block a user