>>>>Hey is there a good way to determine if a connection is still valid???
>>>
>>>In the try /catch block try to execute a simple select statement, e.g. select @@Version or something.
>>
>>IMHO this will create a lot of wasted calls to the server. In my app there are hundreds of TableUpdate() issued. And doing the above before each one will create great deal of - IMHO - load to the server. I wish there was a method - at least during debugging - to figure out if the connection dropped. By the way, I check the connection handle value in the debugger and it has a value. But apparently, for TableUpdate() to work, it is not enough.
>
>typical approach to such problems is to save time of last working time
>and to check only if time elapsed is greater than certain threshold.
In my case, everything happens pretty much within a minute. I start the application, go to this routine; try to add a record; then save. And it works with some databases and does not with others. Thank you for your suggestion.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham