ADO.NET with network problems

M

Mika M

Hi!

I have made quite simple VB.NET (2003) Windows Forms-application to insert
only new lines into single database table for tracing purposes. (Other form
is used to browse target table with filterings.) I created inserting form
creating DataSet with one DataTable, bound these DataTable fields into
ComboBoxes and TextBoxes, and used DataAdapters Update method to insert new
lines into Database table of the DataSet DataTable.

All this is working fine now, but application should be more network faulty
tolerant. I mean if network is temporarily down (cutting or something like
that), application should work without errors. Any suggestions how to do
this? How this kind of network situations use to be handled?

I tried to write something into one of the TextBoxes, and when I moved focus
to other TextBox after I unplugged network cable of my workstation, I'll get
the following error message...

"SQL Error

[DBNETLIB] [ConnectionRead (recv()).]General network error. Check your
network documentation."

I think it should be possible to save lines into DataSet DataTable dispite
network is temporarily down, and if DataAdapters Update method fails then
catch DataAdapter error, and try saving later - or is it? Hopefully I don't
have to remove databindings of the ComboBoxes and TextBoxes, and change
application to use INSERT INTO sql-statements.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top