Version 1.1.0.2

This commit is contained in:
Jonathan Jenne 2020-09-22 16:46:41 +02:00
parent 20edc49a92
commit 6b2c0b696b

View File

@ -121,7 +121,7 @@ Public Class Winline
Try Try
Dim oGroupCode As String = GroupId.ToString.PadLeft(2, "0") Dim oGroupCode As String = GroupId.ToString.PadLeft(2, "0")
Dim oVersionCode As String = VersionId.ToString.PadLeft(2, "0") Dim oVersionCode As String = VersionId.ToString.PadLeft(2, "0")
Dim oDbResult = _Winline.GetScalarValue($"SELECT MAX(CONVERT(INT, C223)) FROM v021 WHERE c010 LIKE '{VendorCode}{oGroupCode}{oVersionCode}___'") Dim oDbResult = _Winline.GetScalarValue($"SELECT MAX(CONVERT(INT, SUBSTRING(c010, 7, 3))) FROM v021 WHERE c010 LIKE '{VendorCode}{oGroupCode}{oVersionCode}___'")
If IsNumeric(oDbResult) Then If IsNumeric(oDbResult) Then
Dim oNewRunningNumber = Integer.Parse(oDbResult) + 1 Dim oNewRunningNumber = Integer.Parse(oDbResult) + 1