Lock : How to know if a row is locked ?
Lock : How to know if a row is locked ?
От:
Patrice Espié <patrice.espie@univ-lyon2.fr>
Дата:
Hello, I know SELECT ... FOR UPDATE, but if a row is cirrently locked, my user will wait until the row is unlocked ... perhaps one hour if the other user (the 'locker' one) is taking a bath :) Here are my two questions : .o. How could I know if a row is locked before doing a SELECT ... FOR UPDATE ? .o. Using an ODBC interface (under Windows), how could I get a timeout (knowing that SQLSetStmtAttr( m_hStmt, SQL_ATTR_QUERY_TIMEOUT, (void*)SecondTimeOut, SQL_IS_INTEGER ) doesn't works...) which stops (break ?) the SELECT or other SQL order ? Thanks Patrice Espié -- Le Monde, c'est comme un éléphant qui va à la pêche