Re: Multi-thread client support in databses like infomix, sybase...
Posted in 1994
Sachit Malhotra (malhotra-sachit@cs.yale.edu) wrote: > We bought informix and got stuck with it. It cannot support a multi-threaded > client. > Informix has an SQL server which is multi-threaded, and each thread > looks after a process. But it cannot handle a process with multiple > threads making several database calls simultaneously - ALL BECAUSE > OF ONE REASON: dumb sqlca structure and non-reentrant database libraries. > > It seems that there is a global structure "sqlca" which returns the results > of a database transaction. So, if you try to perform two operations at the > same time, this structure will get currupted. > Can anyone tell me a reason to do this? I would assume a neater and sensible > way to do this would be to allow the programmer to define a structure of > type "sqlca" and pass a pointer to it to database routines. The database > returns values in this structure. Is there any reason why you can't open a new connection for each thread, then when switching threads use SET CONNECTION to change to the apropos connection? Dave Disclaimer: The opinions expressed in this message are not those of Informix Software, its partners or lackeys. Anyone who says otherwise is itching for a fight. **************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney