Home > Net >  C # is essentially the database connection
C # is essentially the database connection

Time:12-22

Before the program is running, not deliberately broken network makes its connection is essentially a database query information, why a try catch statement did not detect abnormalities,
Still say this is not an exception, it's just an empty value

CodePudding user response:

The code posted and have a look

CodePudding user response:

Try catch is not everything. There's mastercard & general timeout to quote exception, usually 30 seconds, this can be set, you can be set to never timeout, never reported to the timeout error

CodePudding user response:

reference 1st floor ziqi0716 response:
code posted see

Code is a column information, query the database in the try catch exceptions, no other what of, deliberately broken network to run the program without Internet (not a local database, so can't see)

CodePudding user response:

As the second floor, you can set the timeout, or wait for 30 seconds, look to whether an exception is thrown.

CodePudding user response:

Code have blocked connection database query and would be submitted to the timeout exception to the broken network,
  •  Tags:  
  • C#
  • Related