row locks and ODBC
Posted in 1997
The scenario is: A CGI-based application, using ODBC to talk to an Informix OnLine 7 server on another box. Lots of users will be accessing the data via HTTP, and the CGI-based application will be modifying their personal data. At the same time, local users may also be modifying data in the same tables. We'd like to have some sort of locking to prevent a local user from modifying a row that the CGI program has read and plans to modify and write back in. I'm not very familiar with the relvant Informix words & concepts, but are "row locks" what I want to use? The developers of the ODBC application (I am not one of them, I'm just supporting them and the database) would like to know: - How can their programs lock the appropriate rows when they read the data, and unlock them when they write the new data in? - What happens when something has already locked that row? I would additionally like to know: - What's a good way to deal with the fact that occasionally, a CGI instance will read data and lock it, but die before it completes its work? Can locks "time out"? -- Cos (Ofer Inbar) -- cos@leftbank.com cos@cs.brandeis.edu -- The Left Bank Operation -- lbo@leftbank.com http://www.leftbank.com/ Time is simply the obsession of those who know theirs is limited. -- Amy Dora Lynn. What's time to a pig? -- proverbial farmer.