Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Intermittent oracle error

Re: Intermittent oracle error

From: Thom Williams <twilliams_at_adittech.com>
Date: 10 Apr 2003 05:02:04 -0700
Message-ID: <7ea56f73.0304100402.4d8b34e8@posting.google.com>


"Gabriel Gonzalez" <no-spam_at_no-spam.com> wrote in message news:<opacnTe2KI8dEwmjXTWcoA_at_giganews.com>...
> Two questions:
>
> 1) How are you calling this, ODBC, OLEDB, which exact driver (ie, Oracle
> ODBC v8.0.5.2, etc...)?
>
> 2) What is the VB source code (what is your code, do you prepare statement,
> how do you call the function, how do you assign bind variables, etc...)

Thank you for your response, here are the answers to your questions.

  1. Talking to Oracle via OraOLEDB 9.2.0.1.0
  2. Here is the VB code for the procedure Private Sub LoadInventoryFacilities(oControl As Control) Const ProcName = "clsInventoryManager::LoadInventoryFacilities" On Error GoTo ErrHandler Dim oCmd As New ADODB.Command Dim ors As New ADODB.Recordset Dim oNode As Node Dim oInboundNode As Node Dim oOutboundNode As Node With oCmd .ActiveConnection = coSession.Connection .CommandType = adCmdStoredProc .CommandText = "PKG_INVENTORY.GETINVENTORYFACILITIES" ' Enable PLSQLRSet property .Properties("PLSQLRSet") = True End With

    Set ors = oCmd.Execute
    ' will need a while loop here
    While Not ors.EOF

        If UCase(TypeName(oControl)) = "TREEVIEW" Then
            Set oNode = oControl.Nodes.Add("root", tvwChild,
"Facility" & ors("facilityid"), ors("facilityname"), "donorfac")
            oNode.Tag = ors("facilityid")
            With oControl.Nodes
                Set oInboundNode = .Add("Facility" &
ors("facilityid"), tvwChild, "Inbound" & ors("facilityid"), "Inbound", "pools", "openpools")
                oInboundNode.Tag = ors("FacilityID")
                
                Set oOutboundNode = .Add("Facility" &
ors("facilityid"), tvwChild, "Outbound" & ors("facilityid"), "Outbound", "pools", "openpools")
                oOutboundNode.Tag = ors("FacilityID")
            End With
    
        ElseIf UCase(TypeName(oControl)) = "COMBOBOX" Or
UCase(TypeName(oControl)) = "LISTBOX" Then
            oControl.AddItem ors("FacilityName")
            oControl.ItemData(oControl.NewIndex) = ors("FacilityID")
        End If
        ors.MoveNext

    Wend
    ors.Close
Exit Sub
ErrHandler:
Err.Raise Err.Number, Err.Source & " < " & ProcName, Err.Description, Err.HelpFile, Err.HelpContext
End Sub Received on Thu Apr 10 2003 - 07:02:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US