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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of Null Instance Handle 1

Status
Not open for further replies.

dandot

Programmer
Jul 19, 2005
53
CA
I am getting this error when trying to run an actuate report: USE OF NULL INSTANCE HANDLE . I have included the fetch method code below with the line prompting the error in bold.


Code:
Function Fetch( ) As AcDataRow
    Dim outputRow as DataRow1
    dim rowdone as boolean
    rowdone = false
'showfactorystatus("runnig...")
    do

        ' check for prior rows, if none, fetch new ones
        if fr is Nothing then 
            set fr = FInput.Fetch()
        end if

        'if er is Nothing then 
        '    set er = EndInput.Fetch()
        'end if 

        if fr is Nothing then 'OR er is Nothing then
            set Fetch = Nothing
            exit function
        End if

        if fr.GetValue("MasterDefFlag") = "YES" then
            [b]outputRow.SetValue("MasterDefComments", fr.GetValue("DefComments"))[/b]
            outputRow.SetValue("MasterDefDesc", fr.GetValue("DefDesc"))
            outputRow.SetValue("MasterDefDueDate", fr.GetValue("DefDueDate"))
            outputRow.SetValue("MasterOwner", fr.GetValue("DefOwner"))
            'outputRow.SetValue("LOBFrom", fr.GetValue("LOBFrom"))
        ' set er=Nothing
            set fr = Nothing
        
        else
            outputRow.SetValue("AggAP", fr.GetValue("APName"))
            outputRow.SetValue("AggDesc", fr.GetValue("DefDesc"))
            outputRow.SetValue("AggDueDate", fr.GetValue("DefDueDate"))
            outputRow.SetValue("AggOwner", fr.GetValue("DefOwner"))
            outputRow.SetValue("AggStream", fr.GetValue("Stream"))
            outputRow.SetValue("MasterTheme", fr.GetValue("DefTheme"))
            set fr = Nothing        
            rowdone = true
                'end if
        end if
        loop until rowdone = true    
    
    Set Fetch = outputRow    

End Function
 
You have declared outputRow with Dim statement.

You have to initialize it with
Set outputRow = New DataRow1

Place the above statement wherever it will be correct logically.

I hope this helps.

-- JB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top