sqldetach fails to return
Posted in 2007
Topics: General Discussion
I´ve some problems using the sqldetach() function. Sometimes it happens that the functions fails to return. This is probably because there is some problem with the database server. Anyway, can i set a timeout for the function so that it returns with a values < 0 and errno shows the reason? I just want that my application can react and hasn´t to be killed from an administrator. Greetings, Joerg
On Nov 26, 7:05 am, Joerg.Spil...@googlemail.com wrote: > I´ve some problems using the sqldetach() function. Sometimes it > happens that the functions fails to return. This is probably because > there is some problem with the database server. Anyway, can i set a > timeout for the function so that it returns with a values < 0 and > errno shows the reason? I just want that my application can react and > hasn´t to be killed from an administrator. > > Greetings, Joerg Read in the ESQL/C or CLI manual about the call-back feature. This provides a simple timeout mechanism. The alternative is to use the signal() system call interface to set a SIGALRM handler and timer to configure the timeout yourself (pretty much that's what the call-back is doing for you under the hood). Art S. Kagel