4 Replies - 459 Views - Last Post: 20 January 2019 - 06:27 PM Rate Topic: -----

#1 Steve7419   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 34
  • Joined: 19-November 18

VB.net application alert imports one entry only

Posted 11 January 2019 - 07:49 PM

Hello All,


I have an interface application that is used to import some entries from staging database into an erp database by using a certain field to trigger.
There are two entries that is needed to import. When I run the application either directly in the interface application itself or by using task scheduler job, the system works fine but it imports one entry only meanwhile there are two entries that are needed to import.

Herewith this topic I attach the screen shot of the message.
How can I get rid of this error?

I appreciate your help so much


Rgds,
Steve

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: VB.net application alert imports one entry only

#2 Steve7419   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 34
  • Joined: 19-November 18

Re: VB.net application alert imports one entry only

Posted 18 January 2019 - 11:32 PM

Allow me to explain more detail about my question.
My question asks if there is a way to let the program continue after an exception is thrown.
I would like to know.

I check the solution in this following link :

https://stackoverflo...after-exception

but it seems the code continues for one line exception only. What about if there are hundreds of lines and many exceptions are thrown. Please help. I appreciate your help so much.


Reagards,
Steve
Was This Post Helpful? 0
  • +
  • -

#3 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 195
  • View blog
  • Posts: 1,089
  • Joined: 05-December 13

Re: VB.net application alert imports one entry only

Posted 19 January 2019 - 07:27 AM

Firstly, why are you writing code that throws so many exceptions, and aren't you trying to avoid these errors with conditional logic?
Secondly, its best practice to write code that does not provoke or cause exceptions to flare up everywhere. So Steve; what is it that you are doing, that is causing so many exceptions? (Provide your code so we can see)
Thirdly, its generally bad practice to use Try Catch Finally Blocks to catch errors and ignore them. Generally these blocks are used to catch exceptions with problematic code and handle the errors in the catch section of that block (Although, exceptions are often made depending on the type of exception as seen in link. <<)

Lastly, what is your ultimate goal here? Your first post reflects working with some tables or cells, while your second post asks how to catch and ignore errors.

Further; My question asks if there is a way to let the program continue after an exception is thrown.

As linked, you may want to work with the finally part of your try catch blocks to do that.

Hope this helps answer your questions, and be sure to read the documentation linked so you get further clarity on what I said.
Was This Post Helpful? 1
  • +
  • -

#4 Steve7419   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 34
  • Joined: 19-November 18

Re: VB.net application alert imports one entry only

Posted 20 January 2019 - 05:32 PM

View PostSheepings, on 19 January 2019 - 07:27 AM, said:

Firstly, why are you writing code that throws so many exceptions, and aren't you trying to avoid these errors with conditional logic?
Secondly, its best practice to write code that does not provoke or cause exceptions to flare up everywhere. So Steve; what is it that you are doing, that is causing so many exceptions? (Provide your code so we can see)
Thirdly, its generally bad practice to use Try Catch Finally Blocks to catch errors and ignore them. Generally these blocks are used to catch exceptions with problematic code and handle the errors in the catch section of that block (Although, exceptions are often made depending on the type of exception as seen in link. <<)

Lastly, what is your ultimate goal here? Your first post reflects working with some tables or cells, while your second post asks how to catch and ignore errors.

Further; My question asks if there is a way to let the program continue after an exception is thrown.

As linked, you may want to work with the finally part of your try catch blocks to do that.

Hope this helps answer your questions, and be sure to read the documentation linked so you get further clarity on what I said.


Thanks a lot for your answer. I will check and will be back for the result.


Regards,
Steve
Was This Post Helpful? 0
  • +
  • -

#5 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 195
  • View blog
  • Posts: 1,089
  • Joined: 05-December 13

Re: VB.net application alert imports one entry only

Posted 20 January 2019 - 06:27 PM

Just to be clear, if you want to catch and ignore the errors, try ' stuff like code here ' catch (anything between try catch will be caught but its best to work on handling the exceptions unless you know its safe to ignore them, in which you can continue on in the finally section of those blocks.) I advise reading the docs I linked so you understand properly.

Also no need to quote in full, or best just hit reply without quoting, and if quoting is needed, trim it down. ;)
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1