Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function GetPartPriorty( _
sPN As String) As String
'--------------------------------------------------
'SkipVought
'2007-08-02
'--------------------------------------------------
' Access: DB2.SFCS.READ
'--------------------------------------------------
':this function returns PRIPART for a given Part Number
'--------------------------------------------------
Dim sConn As String, sSQL As String, sServer As String
Dim rst As ADODB.Recordset, cnn As ADODB.Connection
Dim lLineCtrl
Set cnn = New ADODB.Connection
sServer = "DB2OLEDB"
cnn.Open "Provider=MSDASQL.1;Persist Security Info=False;" & _
"User ID=;" & _
"Extended Properties=""DSN=Shadow Direct DB2P 32-bit;" & _
"UID=;PORT=6800;HOST=mvsb1;SUBSYS=DB2P;CPFX=SHADOW;AT=YES;" & _
"DP=%;AF=YES;MXBU=40960;AUST=NO;CNTM=120;"""
Set rst = New ADODB.Recordset
' sSQL = "SELECT Qty, Current_Op, Location, sf_cc, sf_oper, mach_grp "
sSQL = "SELECT PRIPART "
sSQL = sSQL & "FROM CAP.T_PART_NUMBER "
sSQL = sSQL & "WHERE (PARTNO='" & Trim(sPN) & "')"
rst.Open sSQL, cnn, adOpenStatic, adLockReadOnly, adCmdText
rst.MoveFirst
If rst(0) <> "" Then
GetPartPriorty = rst(0)
End If
rst.Close
cnn.Close
Set rst = Nothing
Set cnn = Nothing
End Function