35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
Function GetWinLineProductInfoByProductNumber(ProductNumber, WinLineMandatorNr, WinLineYear)
|
|
|
|
'Version Date 23.09.2020
|
|
|
|
On Error Resume Next
|
|
|
|
If (ProductNumber <> "") Then
|
|
|
|
SQLTable_WinLineProductInfo = "V021"
|
|
SQLQuery_WinLineProductInfo = "c011 = '"& ProductNumber &"' and c002 = c011 and MESOCOMP = '"& WinLineMandatorNr &"' AND MESOYEAR = '"& WinLineCurrentYear &"'"
|
|
|
|
Set SQLResult_WinLineProductInfo = CWLStart.CurrentCompany.SearchRecord (SQLTable_WinLineProductInfo, SQLQuery_WinLineProductInfo)
|
|
|
|
If (DEBUG_ON = True) or (DebugMode = "Enabled" ) Then
|
|
AddDebugLine "Querying for Article Number.. " & vbNewline
|
|
AddDebugLine "Result Columns: " & SQLResult_WinLineProductInfo
|
|
AddDebugLine "Result Rows: " & SQLResult_WinLineProductInfo.RowCount
|
|
AddDebugLine "SQL: " & SQLQuery_WinLineProductInfo
|
|
|
|
ShowDebugBox "GetWinLineInternalProductNumber"
|
|
End If
|
|
|
|
If (SQLResult_WinLineProductInfo.RowCount = -1) or (SQLResult_WinLineProductInfo.RowCount = 0) Then
|
|
|
|
GetWinLineProductInfoByProductNumber = 0
|
|
|
|
Elseif (SQLResult_WinLineProductInfo.RowCount >= 1) Then
|
|
|
|
Set GetWinLineProductInfoByProductNumber = SQLResult_WinLineProductInfo
|
|
|
|
End if
|
|
|
|
End if
|
|
|
|
End Function ' GetWinLineProductInfoByProductNumber |