Module: Reorg / Cleanup
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
Function GetWinLineInternalProductNumber(ProductNumber, SerialNumber)
|
||||
Set Conn = CWLStart.CurrentCompany.Connection
|
||||
|
||||
If SerialNumber = "" Then
|
||||
GetWinLineInternalProductNumber = ProductNumber
|
||||
Else
|
||||
SQL = "SELECT [c002] FROM [v021] (NOLOCK) WHERE [c011] = '"& ProductNumber &"' AND [c068] = '"& SerialNumber &"' " & SQLQuery_BasicWhere
|
||||
|
||||
Set Result = Conn.Select(SQL)
|
||||
|
||||
If DEBUG_ON = True Then
|
||||
AddDebugLine "Querying for Internal Article Number.. " & vbNewline
|
||||
AddDebugLine "Result Columns: " & Result
|
||||
AddDebugLine "Result Rows: " & Result.RowCount
|
||||
AddDebugLine "SQL: " & SQL
|
||||
|
||||
ShowDebugBox "GetWinLineInternalProductNumber"
|
||||
End If
|
||||
|
||||
If Result < 0 Then
|
||||
If err <> 0 Then
|
||||
Msgbox "Fehler bei Abfrage:" & vbNewline & err.description, vbExclamation, DEFAULT_TITLE & " - GetWinLineInternalProductNumber"
|
||||
Exit Function
|
||||
Else
|
||||
Msgbox "Abfrage lieferte keine Ergebnisse.", vbExclamation, DEFAULT_TITLE & " - GetWinLineInternalProductNumber"
|
||||
Exit Function
|
||||
End If
|
||||
End If
|
||||
|
||||
GetWinLineInternalProductNumber = Result.Value("c002")
|
||||
End If
|
||||
End Function
|
||||
Reference in New Issue
Block a user