Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect from Project to Oracle 10i using ADO

Status
Not open for further replies.

pelagic

Programmer
Nov 7, 2002
97
US
Hi there,

Can any one give me a hint how to connect from
MS project 2003 pro to Oracle 10i using ADO?


Thanks in advanced.
 



Hi,
Code:
Function GetInvData(sPN As String) As Variant
'SkipVought/2005 Aug 29/817-280-5438
'--------------------------------------------------
' Access: DWPROD.FRH_MRP.READ
'--------------------------------------------------
'this function returns the sum of On Hand, On Dock & In Transit for a given part number
' where the store type is not 'W'
'--------------------------------------------------
    Dim sConn As String, sSQL As String, sServer As String
    Dim rst As ADODB.Recordset, cnn As ADODB.Connection
    
    Set cnn = New ADODB.Connection
    
    sServer = "DWPROD"
    cnn.Open "Driver={Microsoft ODBC for Oracle};" & _
               "Server=" & sServer & ";" & _
               "Uid=;" & _
               "Pwd="
    
    Set rst = New ADODB.Recordset
    
    sSQL = "SELECT Sum(A.STKITQTY_233+A.STKOHQTY_233+A.QTYONDOK_233) AS Inv_Qty "
    sSQL = sSQL & "FROM FRH_MRP.PSK02233 A "
    sSQL = sSQL & "Where A.PARTNO_201='" & Trim(sPN) & "' "
    sSQL = sSQL & "  And STORETYP_233<>'W' "
    
    rst.Open sSQL, cnn, adOpenStatic, adLockReadOnly, adCmdText
...


Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top