473,385 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

exception error when closing app

Ron
my application is throwing an exception error when closing
if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to
completely shut down the app through code? I am using

End

for now. Is there a way I can suppress this exception
message? The app gets invoked programmatically on a
schedule. So no one would be around to click off the
error message.

Thanks
Nov 21 '05 #1
9 2081
Hi,

How do you close the app? Have you tried
Application.Exit()

HTH,

Bernie Yaeger

"Ron" <an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
my application is throwing an exception error when closing
if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to
completely shut down the app through code? I am using

End

for now. Is there a way I can suppress this exception
message? The app gets invoked programmatically on a
schedule. So no one would be around to click off the
error message.

Thanks

Nov 21 '05 #2
Ron
No. But I am pretty sure that is what I was looking for.

Thanks.
-----Original Message-----
Hi,

How do you close the app? Have you tried
Application.Exit()

HTH,

Bernie Yaeger

"Ron" <an*******@discussions.microsoft.com> wrote in messagenews:0c****************************@phx.gbl...
my application is throwing an exception error when closing if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to
completely shut down the app through code? I am using

End

for now. Is there a way I can suppress this exception
message? The app gets invoked programmatically on a
schedule. So no one would be around to click off the
error message.

Thanks

.

Nov 21 '05 #3
"Ron" <an*******@discussions.microsoft.com> schrieb:
my application is throwing an exception error when closing
if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to
completely shut down the app through code? I am using

End

for now.


What exception?

Notice that 'End' or 'Application.Exit' is not the best choice. Instead,
simply close the main form by calling its 'Close' method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
Ron
Thank you. I changed it to Me.Close. But I still get the
Application error when I invoke the app from another app.
The error is

Application Error
The instruction at "0x7923302d" referenced memor
at "0x00219404", the memory could nto be read".

I am running a DTS package from vb.net. I was having
problems running the package from the original app so I
created a separate app that I start with
system.diagnostics.process.start(app, args) from the
original app. The 2nd app only runs DTS.

Then the DTS app is supposed to close itself. But I keep
getting the error above when I run the DTS package
procedure. If I don't run the DTS package then the DTS
app closes correctly. Note: the DTS package runs fine,
but something is getting set by the DTS procedure at the
system level. I wish I knew what it was so I could
reset it.

Ron

-----Original Message-----
"Ron" <an*******@discussions.microsoft.com> schrieb:
my application is throwing an exception error when closing if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to
completely shut down the app through code? I am using

End

for now.
What exception?

Notice that 'End' or 'Application.Exit' is not the best

choice. Instead,simply close the main form by calling its 'Close' method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

Nov 21 '05 #5
Ron
OK. I think I fixed (I hope!). I moved the Me.Close
statement out of the DTS package procedure and into a
Timer procedure. Apparently, the DTS package is very
touchy and does not want to perform anything else that is
not part of the DTS Package. Man, I can't wait for
ADO.net2 (note: I use DTS because I am moving a few gigs
of data - daily - of course, for the test purpose, each
textfile DTS is reading only contains 100 records right
now).

-----Original Message-----
Thank you. I changed it to Me.Close. But I still get theApplication error when I invoke the app from another app.The error is

Application Error
The instruction at "0x7923302d" referenced memor
at "0x00219404", the memory could nto be read".

I am running a DTS package from vb.net. I was having
problems running the package from the original app so I
created a separate app that I start with
system.diagnostics.process.start(app, args) from the
original app. The 2nd app only runs DTS.

Then the DTS app is supposed to close itself. But I keep
getting the error above when I run the DTS package
procedure. If I don't run the DTS package then the DTS
app closes correctly. Note: the DTS package runs fine,
but something is getting set by the DTS procedure at the
system level. I wish I knew what it was so I could
reset it.

Ron

-----Original Message-----
"Ron" <an*******@discussions.microsoft.com> schrieb:
my application is throwing an exception error whenclosing if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to completely shut down the app through code? I am using

End

for now.


What exception?

Notice that 'End' or 'Application.Exit' is not the best

choice. Instead,
simply close the main form by calling its 'Close' method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

.

Nov 21 '05 #6
What kind of package are you running? Bulk insert?
"Ron" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
OK. I think I fixed (I hope!). I moved the Me.Close
statement out of the DTS package procedure and into a
Timer procedure. Apparently, the DTS package is very
touchy and does not want to perform anything else that is
not part of the DTS Package. Man, I can't wait for
ADO.net2 (note: I use DTS because I am moving a few gigs
of data - daily - of course, for the test purpose, each
textfile DTS is reading only contains 100 records right
now).

-----Original Message-----
Thank you. I changed it to Me.Close. But I still get

the
Application error when I invoke the app from another

app.
The error is

Application Error
The instruction at "0x7923302d" referenced memor
at "0x00219404", the memory could nto be read".

I am running a DTS package from vb.net. I was having
problems running the package from the original app so I
created a separate app that I start with
system.diagnostics.process.start(app, args) from the
original app. The 2nd app only runs DTS.

Then the DTS app is supposed to close itself. But I keep
getting the error above when I run the DTS package
procedure. If I don't run the DTS package then the DTS
app closes correctly. Note: the DTS package runs fine,
but something is getting set by the DTS procedure at the
system level. I wish I knew what it was so I could
reset it.

Ron

-----Original Message-----
"Ron" <an*******@discussions.microsoft.com> schrieb:
my application is throwing an exception error when

closing
if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to completely shut down the app through code? I am using

End

for now.

What exception?

Notice that 'End' or 'Application.Exit' is not the best

choice. Instead,
simply close the main form by calling its 'Close' method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

.

Nov 21 '05 #7
Hi Ron,

I run DTS packages through the sql server agent. It runs the package and
closes itself without incident. I see that you may have the problem solved,
so that's what counts; but if you don't, you may want to use sql server's
server agent for this.

HTH,

Bernie

"Ron" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
Thank you. I changed it to Me.Close. But I still get the
Application error when I invoke the app from another app.
The error is

Application Error
The instruction at "0x7923302d" referenced memor
at "0x00219404", the memory could nto be read".

I am running a DTS package from vb.net. I was having
problems running the package from the original app so I
created a separate app that I start with
system.diagnostics.process.start(app, args) from the
original app. The 2nd app only runs DTS.

Then the DTS app is supposed to close itself. But I keep
getting the error above when I run the DTS package
procedure. If I don't run the DTS package then the DTS
app closes correctly. Note: the DTS package runs fine,
but something is getting set by the DTS procedure at the
system level. I wish I knew what it was so I could
reset it.

Ron

-----Original Message-----
"Ron" <an*******@discussions.microsoft.com> schrieb:
my application is throwing an exception error when closing if I run a procedure in the app. I can't even trap the
error with try/catch ex As Exception. Is there a way to
completely shut down the app through code? I am using

End

for now.


What exception?

Notice that 'End' or 'Application.Exit' is not the best

choice. Instead,
simply close the main form by calling its 'Close' method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

Nov 21 '05 #8
Ron
Yes, bulk insert. Originally, I was using vb6 and pulling
data from an external data source (non rdbms) and writing
each record to sql server record by record. It started
taking too long (several hours) and was becoming
unreliable, connection open too long. So with vb.net, I
read each record and write it to a series of text files
(each text file will contain at most 20,000 records). I
write close to 100 textfiles (nearly 2,000,000 records).
Then I suck em all up with DTS - takes only 2-3 minutes
with vb.net. The suggestion of using the DTS Agent is
that I have nearly 100 text files to import. I loop
through my DTS package in the vb.net app. Much easier
than using the agent. The new system takes between 1 to 1
½ hrs. Way more reliable because writing text files is a
snap with vb.net. Plus, vb.net runs the DTS package 3-4
times faster than vb6

But I understand that ado.net2 will have bulk insert
capabilities similar to DTS. I sure hope that is true. I
believe that DTS packages are hard to deal with because
they are basically com based, I mean I have to make a
reference to DTS package Object Library from the com tab
in references.

-----Original Message-----
What kind of package are you running? Bulk insert?
"Ron" <an*******@discussions.microsoft.com> wrote in message news:06****************************@phx.gbl...
OK. I think I fixed (I hope!). I moved the Me.Close
statement out of the DTS package procedure and into a
Timer procedure. Apparently, the DTS package is very
touchy and does not want to perform anything else that is not part of the DTS Package. Man, I can't wait for
ADO.net2 (note: I use DTS because I am moving a few gigs of data - daily - of course, for the test purpose, each
textfile DTS is reading only contains 100 records right
now).

-----Original Message-----
Thank you. I changed it to Me.Close. But I still get

the
Application error when I invoke the app from another

app.
The error is

Application Error
The instruction at "0x7923302d" referenced memor
at "0x00219404", the memory could nto be read".

I am running a DTS package from vb.net. I was having
problems running the package from the original app so I
created a separate app that I start with
system.diagnostics.process.start(app, args) from the
original app. The 2nd app only runs DTS.

Then the DTS app is supposed to close itself. But I keepgetting the error above when I run the DTS package
procedure. If I don't run the DTS package then the DTS
app closes correctly. Note: the DTS package runs fine,
but something is getting set by the DTS procedure at the
system level. I wish I knew what it was so I could
reset it.

Ron
-----Original Message-----
"Ron" <an*******@discussions.microsoft.com> schrieb:
> my application is throwing an exception error when
closing
> if I run a procedure in the app. I can't even trap the> error with try/catch ex As Exception. Is there a way

to
> completely shut down the app through code? I am using>
> End
>
> for now.

What exception?

Notice that 'End' or 'Application.Exit' is not the best
choice. Instead,
simply close the main form by calling its 'Close' method.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

.

.

Nov 21 '05 #9
We did something similiar at work (Bulk Insert doing about 140,000 records)
and was running through the same issues. I was originally trying to use the
BCP program and shell out to that, but became too unreliable and couldn't
manage events that would happen (out of 140,000 rows 2 would fail, I know
you can keep going but I needed to inform the user immediatly).

What we ended up doing was using the COM object for SQL DMO (I *think*
that's the library) and this worked AWESOME! Good event model on when it
inserts rows, good documentation and you run it in process so you could keep
an eye on everything going on. 140,000 records took roughly 30 seconds
doing it this way. The whole procedure took 15 minutes, 13 of that to
generate the XML file from this proprietary language called guru, 1.5
minutes for the XML DOM parser to read it in, and 2 seconds for the XSLT
transform, and 30 for the insert.

So check out the COM object, you'll find it really easy to use and easier to
debug/work with.

HTH,
CJ

"Ron" <an*******@discussions.microsoft.com> wrote in message
news:0d****************************@phx.gbl...
Yes, bulk insert. Originally, I was using vb6 and pulling
data from an external data source (non rdbms) and writing
each record to sql server record by record. It started
taking too long (several hours) and was becoming
unreliable, connection open too long. So with vb.net, I
read each record and write it to a series of text files
(each text file will contain at most 20,000 records). I
write close to 100 textfiles (nearly 2,000,000 records).
Then I suck em all up with DTS - takes only 2-3 minutes
with vb.net. The suggestion of using the DTS Agent is
that I have nearly 100 text files to import. I loop
through my DTS package in the vb.net app. Much easier
than using the agent. The new system takes between 1 to 1
½ hrs. Way more reliable because writing text files is a
snap with vb.net. Plus, vb.net runs the DTS package 3-4
times faster than vb6

But I understand that ado.net2 will have bulk insert
capabilities similar to DTS. I sure hope that is true. I
believe that DTS packages are hard to deal with because
they are basically com based, I mean I have to make a
reference to DTS package Object Library from the com tab
in references.

-----Original Message-----
What kind of package are you running? Bulk insert?
"Ron" <an*******@discussions.microsoft.com> wrote in messagenews:06****************************@phx.gbl...
OK. I think I fixed (I hope!). I moved the Me.Close
statement out of the DTS package procedure and into a
Timer procedure. Apparently, the DTS package is very
touchy and does not want to perform anything else that is not part of the DTS Package. Man, I can't wait for
ADO.net2 (note: I use DTS because I am moving a few gigs of data - daily - of course, for the test purpose, each
textfile DTS is reading only contains 100 records right
now).

-----Original Message-----
Thank you. I changed it to Me.Close. But I still get

the
Application error when I invoke the app from another

app.
The error is

Application Error
The instruction at "0x7923302d" referenced memor
at "0x00219404", the memory could nto be read".

I am running a DTS package from vb.net. I was having
problems running the package from the original app so I
created a separate app that I start with
system.diagnostics.process.start(app, args) from the
original app. The 2nd app only runs DTS.

Then the DTS app is supposed to close itself. But I keepgetting the error above when I run the DTS package
procedure. If I don't run the DTS package then the DTS
app closes correctly. Note: the DTS package runs fine,
but something is getting set by the DTS procedure at the
system level. I wish I knew what it was so I could
reset it.

Ron
-----Original Message-----
"Ron" <an*******@discussions.microsoft.com> schrieb:
> my application is throwing an exception error when
closing
> if I run a procedure in the app. I can't even trap the> error with try/catch ex As Exception. Is there a way

to
> completely shut down the app through code? I am using>
> End
>
> for now.

What exception?

Notice that 'End' or 'Application.Exit' is not the best
choice. Instead,
simply close the main form by calling its 'Close' method.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

.

.

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: KKramsch | last post by:
One of the features from other languages that I miss most in C is trappable exceptions. More specifically, I think it's great to be able to demarcate a whole block of code where several exceptions...
3
by: Elp | last post by:
Hi, I've developped a Window Form C# application which main form contains several activex controls. No problems most of the time but on some machine, the application crashes when the main form...
2
by: Richard Collette | last post by:
Hi, I have a service, that runs perfectly when executed outside of the web service environment. When called as a web service I get the exception listed below sporadically. A call to the web...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
Hey all, We get the following error on a lot of our .net application and we are not sure why? I notice that it happens like a timeout issue like if you leave for several minutes. Can someone...
3
by: Miro | last post by:
I cant seem to find an example on how to do something, ( vb2005.express ) i have a Try ListeningSerialPort.Open() TestText.Enabled = True Catch ex As Exception 'Debug.WriteLine(ex.Message)...
4
by: Bgreer5050 | last post by:
I keep getting the following error on an asp form I have on my site. I know the smtp settings are correct, because if I take out the user fields (i.e. name, weight and assign a text string in code...
3
by: cj | last post by:
My program shuts itself down and reboots the pc it's running on at 2:00am twice a week and has been doing so without fail for over a year. But twice in the past month it's been found running in the...
1
by: raghudr | last post by:
Hi all, I am displaying a splash screen for which i have created a thread. Logic is: 1) i will first create a thread to display a splash screen until a big process is completed 2)then i...
2
by: senglory | last post by:
My WCF: public interface IWorkbookService { DataTable GetDownpayments(KeyValuePair<int, string> sgm); } class WorkbookService : IWorkbookService
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.