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

@@ -34,12 +34,12 @@ Public Class clsBook
Public Sub New(ByVal guidBookID As Guid)
mguidBookID = guidBookID
Dim ldbcmdCommand As New SqlClient.SqlCommand
Dim ldbcmdCommand As New Microsoft.Data.SqlClient.SqlCommand
ldbcmdCommand.CommandText = "sel_book"
ldbcmdCommand.CommandType = CommandType.StoredProcedure
' Set up parameter for stored procedure
Dim prmBookID As New SqlClient.SqlParameter
Dim prmBookID As New Microsoft.Data.SqlClient.SqlParameter
prmBookID.ParameterName = "@book_id"
prmBookID.SqlDbType = SqlDbType.UniqueIdentifier
'prmBookID.Size = 5
@@ -108,12 +108,12 @@ Public Class clsBook
Try
MyGlobals.RemoveCachedObject(Me.BookID.ToString)
Dim ldbcmdCommand As New SqlClient.SqlCommand
Dim ldbcmdCommand As New Microsoft.Data.SqlClient.SqlCommand
ldbcmdCommand.CommandText = "del_book"
ldbcmdCommand.CommandType = CommandType.StoredProcedure
' Set up parameter for stored procedure
Dim prmBookID As New SqlClient.SqlParameter
Dim prmBookID As New Microsoft.Data.SqlClient.SqlParameter
prmBookID.ParameterName = "@book_id"
prmBookID.SqlDbType = SqlDbType.UniqueIdentifier
'prmBookID.Size = 5
@@ -153,19 +153,19 @@ Public Class clsBook
MyGlobals.AddCachedObject(Me, Me.BookID.ToString)
If m_blnObjectAlreadyPersisted Then
Dim ldbcmdCommand As New SqlClient.SqlCommand
Dim ldbcmdCommand As New Microsoft.Data.SqlClient.SqlCommand
ldbcmdCommand.CommandText = "upd_book"
ldbcmdCommand.CommandType = CommandType.StoredProcedure
' Set up parameter for stored procedure
Dim prmBookID As New SqlClient.SqlParameter
Dim prmBookID As New Microsoft.Data.SqlClient.SqlParameter
prmBookID.ParameterName = "@book_id"
prmBookID.SqlDbType = SqlDbType.UniqueIdentifier
'prmComposerID.Size = 5
prmBookID.Value = mguidBookID
ldbcmdCommand.Parameters.Add(prmBookID)
' Set up parameter for stored procedure
Dim prmComposerID As New SqlClient.SqlParameter
Dim prmComposerID As New Microsoft.Data.SqlClient.SqlParameter
prmComposerID.ParameterName = "@composer_id"
prmComposerID.SqlDbType = SqlDbType.UniqueIdentifier
'prmComposerID.Size = 5
@@ -176,7 +176,7 @@ Public Class clsBook
End If
ldbcmdCommand.Parameters.Add(prmComposerID)
' Set up parameter for stored procedure
Dim prmInstrumentationID As New SqlClient.SqlParameter
Dim prmInstrumentationID As New Microsoft.Data.SqlClient.SqlParameter
prmInstrumentationID.ParameterName = "@instrumentation_id"
prmInstrumentationID.SqlDbType = SqlDbType.UniqueIdentifier
'prmInstrumentationID.Size = 5
@@ -187,14 +187,14 @@ Public Class clsBook
End If
ldbcmdCommand.Parameters.Add(prmInstrumentationID)
' Set up parameter for stored procedure
Dim prmBookTitle As New SqlClient.SqlParameter
Dim prmBookTitle As New Microsoft.Data.SqlClient.SqlParameter
prmBookTitle.ParameterName = "@book_title"
prmBookTitle.SqlDbType = SqlDbType.VarChar
prmBookTitle.Size = MyGlobals.BOOK_TITLE_SIZE
prmBookTitle.Value = m_strBookTitle
ldbcmdCommand.Parameters.Add(prmBookTitle)
' Set up parameter for stored procedure
Dim prmPublisherID As New SqlClient.SqlParameter
Dim prmPublisherID As New Microsoft.Data.SqlClient.SqlParameter
prmPublisherID.ParameterName = "@publisher_id"
prmPublisherID.SqlDbType = SqlDbType.UniqueIdentifier
'prmPublisherID.Size = 5
@@ -212,19 +212,19 @@ Public Class clsBook
Return False
End If
Else
Dim ldbcmdCommand As New SqlClient.SqlCommand
Dim ldbcmdCommand As New Microsoft.Data.SqlClient.SqlCommand
ldbcmdCommand.CommandText = "ins_book"
ldbcmdCommand.CommandType = CommandType.StoredProcedure
' Set up parameter for stored procedure
Dim prmBookID As New SqlClient.SqlParameter
Dim prmBookID As New Microsoft.Data.SqlClient.SqlParameter
prmBookID.ParameterName = "@book_id"
prmBookID.SqlDbType = SqlDbType.UniqueIdentifier
'prmComposerID.Size = 5
prmBookID.Value = mguidBookID
ldbcmdCommand.Parameters.Add(prmBookID)
' Set up parameter for stored procedure
Dim prmComposerID As New SqlClient.SqlParameter
Dim prmComposerID As New Microsoft.Data.SqlClient.SqlParameter
prmComposerID.ParameterName = "@composer_id"
prmComposerID.SqlDbType = SqlDbType.UniqueIdentifier
'prmComposerID.Size = 5
@@ -235,7 +235,7 @@ Public Class clsBook
End If
ldbcmdCommand.Parameters.Add(prmComposerID)
' Set up parameter for stored procedure
Dim prmInstrumentationID As New SqlClient.SqlParameter
Dim prmInstrumentationID As New Microsoft.Data.SqlClient.SqlParameter
prmInstrumentationID.ParameterName = "@instrumentation_id"
prmInstrumentationID.SqlDbType = SqlDbType.UniqueIdentifier
'prmInstrumentationID.Size = 5
@@ -246,14 +246,14 @@ Public Class clsBook
End If
ldbcmdCommand.Parameters.Add(prmInstrumentationID)
' Set up parameter for stored procedure
Dim prmBookTitle As New SqlClient.SqlParameter
Dim prmBookTitle As New Microsoft.Data.SqlClient.SqlParameter
prmBookTitle.ParameterName = "@book_title"
prmBookTitle.SqlDbType = SqlDbType.VarChar
prmBookTitle.Size = MyGlobals.BOOK_TITLE_SIZE
prmBookTitle.Value = m_strBookTitle
ldbcmdCommand.Parameters.Add(prmBookTitle)
' Set up parameter for stored procedure
Dim prmPublisherID As New SqlClient.SqlParameter
Dim prmPublisherID As New Microsoft.Data.SqlClient.SqlParameter
prmPublisherID.ParameterName = "@publisher_id"
prmPublisherID.SqlDbType = SqlDbType.UniqueIdentifier
'prmPublisherID.Size = 5
@@ -272,7 +272,7 @@ Public Class clsBook
Return False
End If
End If
Catch e As SqlClient.SqlException
Catch e As Microsoft.Data.SqlClient.SqlException
MessageBox.Show(e.Message)
Return False
Catch
@@ -434,12 +434,12 @@ Public Class clsBook
lstrReferencedByString = ""
Dim ldbcmdCommand As New SqlClient.SqlCommand
Dim ldbcmdCommand As New Microsoft.Data.SqlClient.SqlCommand
ldbcmdCommand.CommandText = "sel_book_isreferenced"
ldbcmdCommand.CommandType = CommandType.StoredProcedure
' Set up parameter for stored procedure
Dim prmBookID As New SqlClient.SqlParameter
Dim prmBookID As New Microsoft.Data.SqlClient.SqlParameter
prmBookID.ParameterName = "@book_id"
prmBookID.SqlDbType = SqlDbType.UniqueIdentifier
'prmBookID.Size = 5
@@ -515,7 +515,7 @@ Public Class clsBook
clsPublisher.AddAllPublishersToCache()
Dim lguidBookID As Guid
Dim ldbcmdCommand As New SqlClient.SqlCommand
Dim ldbcmdCommand As New Microsoft.Data.SqlClient.SqlCommand
Dim lobjBook As clsBook
Dim lcolBooks As New System.Collections.Generic.List(Of clsBook)