Update to .Net 10/SQL 2025

This commit is contained in:
Jon
2026-04-21 16:35:57 -05:00
parent 46735bddd3
commit a9379d308e
50 changed files with 2069 additions and 2179 deletions

View File

@@ -1,20 +1,21 @@
Imports System.Data
Imports System.Windows.Forms
Imports Microsoft.Data.SqlClient
Public Class clsDatabaseLayer
Private m_dbcnctConnection As SqlClient.SqlConnection
Private m_dbcnctConnection As Microsoft.Data.SqlClient.SqlConnection
Public Function OpenDatabaseConnection() As Boolean
Try
m_dbcnctConnection = New SqlClient.SqlConnection
m_dbcnctConnection = New Microsoft.Data.SqlClient.SqlConnection
'm_dbcnctConnection.ConnectionString = "Persist Security Info=False;Integrated Security=SSPI;database=OrganLit;server=REUSS\SQLEXPRESS;Connect Timeout=30"
'm_dbcnctConnection.ConnectionString = "Persist Security Info=False;Integrated Security=False;User ID=OrganLitDBLogin;Password=OrganLitDBL0gin7;database=OrganLit;server=REUSS\SQLEXPRESS;Connect Timeout=30"
'm_dbcnctConnection.ConnectionString = "Persist Security Info=False;Integrated Security=False;User ID=OrganLitDBLogin;Password=OrganLitDBL0gin7;database=OrganLit;server=SIRJON\REUSSSQL;Connect Timeout=30"
'm_dbcnctConnection.ConnectionString = "Persist Security Info=False;Integrated Security=False;User ID=OrganLitDBLogin;Password=OrganLitDBL0gin7;database=OrganLit;server=SIRJ\REUSSSQL;Connect Timeout=30"
m_dbcnctConnection.ConnectionString = "Persist Security Info=False;Integrated Security=True;database=OrganLit;server=SIRJ\REUSSSQL;Connect Timeout=30"
m_dbcnctConnection.ConnectionString = "Persist Security Info=False;Integrated Security=True;database=OrganLit;server=SIRJ\REUSSSQL;Connect Timeout=30;TrustServerCertificate=True;Encrypt=False"
m_dbcnctConnection.Open()
Return True
Catch e As SqlClient.SqlException
Catch e As Microsoft.Data.SqlClient.SqlException
MessageBox.Show("Error in OpenDatabaseConnection: " + e.Message)
Return False
Catch e As Exception
@@ -26,7 +27,7 @@ Public Class clsDatabaseLayer
Public Function CloseDatabaseConnection() As Boolean
Try
m_dbcnctConnection.Close()
Catch e As SqlClient.SqlException
Catch e As Microsoft.Data.SqlClient.SqlException
MessageBox.Show("Error in CloseDatabaseConnection: " + e.Message)
Return False
Catch e As Exception
@@ -36,16 +37,16 @@ Public Class clsDatabaseLayer
End Function
Public Function ExecuteDataSet(ByVal objSQLCommand As SqlClient.SqlCommand) As DataSet
Public Function ExecuteDataSet(ByVal objSQLCommand As Microsoft.Data.SqlClient.SqlCommand) As DataSet
Try
objSQLCommand.Connection = m_dbcnctConnection
Dim ldbdaDataAdapter As New SqlClient.SqlDataAdapter
Dim ldbdaDataAdapter As New Microsoft.Data.SqlClient.SqlDataAdapter
ldbdaDataAdapter.SelectCommand = objSQLCommand
Dim ldbdsDataSet As New DataSet
ldbdaDataAdapter.Fill(ldbdsDataSet)
Return ldbdsDataSet
Catch e As SqlClient.SqlException
Catch e As Microsoft.Data.SqlClient.SqlException
MessageBox.Show("Error in ExecuteDataSet: Procedure=" + e.Procedure + ControlChars.CrLf + "Error=" + e.Message)
Return Nothing
Catch e As Exception
@@ -54,7 +55,7 @@ Public Class clsDatabaseLayer
End Try
End Function
Public Function ExecuteNonQuery(ByVal objSQLCommand As SqlClient.SqlCommand) As Integer
Public Function ExecuteNonQuery(ByVal objSQLCommand As Microsoft.Data.SqlClient.SqlCommand) As Integer
'Returns rows affected
Try
@@ -63,7 +64,7 @@ Public Class clsDatabaseLayer
Return lintRowsAffected
Catch e As SqlClient.SqlException
Catch e As Microsoft.Data.SqlClient.SqlException
MessageBox.Show("Error in ExecuteNonQuery: Procedure=" + e.Procedure + ControlChars.CrLf + "Error=" + e.Message)
Return 0
Catch e As Exception