Re: Odd error trapping
- From: "Jon" <ruffles_@xxxxxxx>
- Date: Wed, 2 Nov 2005 10:31:59 -0500
Thanks a bunch!
"TrtnJohn" <TrtnJohn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1808F650-7915-46C5-ABC5-5DDBA68BAF9A@xxxxxxxxxxxxxxxx
> No. Application.Exit just signals the message loop for the current
> application to terminate. The loop can't terminate until you return
> control
> to it. Try adding an Exit Sub after the Application.Exit so you can
> return
> control back to the caller. (I assume this code is inside some Click
> event
> handler or such).
>
> "Jon" wrote:
>
>> It appears that application.exit isn't doing what I think it should be
>> doing. The line oRpt.SetupReportDatabase() causes an except and the
>> exception is caught and the messagebox with the error message pops up, as
>> it
>> should. However, the application does not exit, and the MsgBox("Making
>> params") is executed from the next block of code and execution continues
>> on.
>> Am I doing something wrong? Shouldn't application.exit immediately stop
>> the
>> program. Thanks for any insight!
>>
>> I have the following code:
>>
>> Try
>> MsgBox("Enter create report")
>> oRpt = New
>> MSIReporting.MSICrystal(strNewReport,
>> DBName, AppSettings("WOServer"), AppSettings("WOLogin"),
>> AppSettings("WOPassword"))
>>
>> MsgBox("Exit create report")
>>
>> MsgBox("Set up report DB")
>> oRpt.SetupReportDatabase(DBName,
>> AppSettings("WOServer"), AppSettings("WOLogin"),
>> AppSettings("WOPassword"))
>> MsgBox("Done report db")
>> Catch ex As Exception
>> MsgBox("APPEXIT " + ex.Message)
>>
>> Application.Exit()
>> End Try
>>
>> Try
>> MsgBox("Making params")
>>
>> ReDim oCRParamsName(1, 1)
>> oCRParamsName(0, 0) = "WO"
>> oCRParamsName(0, 1) = drRow(3)
>>
>>
>>
.
- Prev by Date: Re: error when delete a file
- Next by Date: Re: newbie question, 1.0 and 1.1
- Previous by thread: Re: Odd construct in VB.NET that Im trying to understand
- Next by thread: Re: newbie question, 1.0 and 1.1
- Index(es):
Relevant Pages
|