This commit is contained in:
2024-02-26 12:42:52 +01:00
parent 6e023041f9
commit 39dd8a0501
36 changed files with 11903 additions and 629 deletions

View File

@@ -787,7 +787,7 @@ Public Class SQL
Return defaultReturn
End Function
Public Function doSQL(ByVal sql As String, Optional conn_art As String = "SDL", Optional showErr As Boolean = True, Optional list As List(Of MyListItem2) = Nothing, Optional conn As SqlConnection = Nothing) As Boolean
Public Function doSQL(ByVal sql As String, Optional conn_art As String = "SDL", Optional showErr As Boolean = True, Optional list As List(Of MyListItem2) = Nothing, Optional conn As SqlConnection = Nothing, Optional timeout As Integer = 0) As Boolean
If conn Is Nothing Then
conn = New SqlConnection
@@ -812,9 +812,11 @@ Public Class SQL
conn.Open()
End Select
End If
Try
' MsgBox(sql)
Using cmd As New SqlCommand(sql, conn)
If timeout > 0 Then cmd.CommandTimeout = timeout
If list IsNot Nothing Then
For Each i In list
'MsgBox(i.Text.trim & " " & IIf(i.Value Is Nothing, DBNull.Value, i.Value))