serious trouble with bool and Access
serious trouble with bool and Access
От:
Markus Wagner <wagner@imsd.uni-mainz.de>
Дата:
Hi, we're in serious trouble with an application using BOOLs. We have boolean attributes in a pg table, being represented as checkboxes in Access. Changing these controls results in an error message "another user has changed the data", or something like that. We tried nearly everything. The mailing list archives gave hints to the pg ODBC driver, the "bools as char" flag and so on. We tried with and without this flag. Then, without it, the problem seemed to be solved. But we found that now the data must have been changed several times in different records, before the problem reappears. Our current settings are "bools as char" off, "text as longvarchar" off. The bools are normal BOOL attributes of size 1, as reported by pgaccess. We also tried to change the table properties for the fields in Access, "display as checkbox" and so on. We drag the fields from the field list into the form. But also changing the ODBC-connected tables directly results in the same error. Isn't there a unique solution to that? Why are bools that critical? Thank you very much, Markus
Re: serious trouble with bool and Access
От:
"Henshall, Stuart - WCP" <SHenshall@westcountrypublications.co.uk>
Дата:
Hi,Bools are 16 bit integers in MS Access. To get around this problem I just defined int2 in the fields where I wanted bools and this seems to be working fine. I always check field<>false as, in MS Access, false=0 and true=-1, but of course int2s can have other values. To help MS Access with its versioning try turning row versioning on. Hope this helps, - Stuart > -----Original Message----- > From: Markus Wagner [mailto:wagner@imsd.uni-mainz.de] > Sent: 15 February 2002 07:36 > To: pgsql-interfaces@postgresql.org > Subject: serious trouble with bool and Access > > > Hi, > > we're in serious trouble with an application using BOOLs. We > have boolean > attributes in a pg table, being represented as checkboxes in > Access. Changing > these controls results in an error message "another user has > changed the > data", or something like that. > > We tried nearly everything. The mailing list archives gave > hints to the pg > ODBC driver, the "bools as char" flag and so on. We tried > with and without > this flag. Then, without it, the problem seemed to be solved. > But we found > that now the data must have been changed several times in > different records, > before the problem reappears. > > Our current settings are "bools as char" off, "text as > longvarchar" off. The > bools are normal BOOL attributes of size 1, as reported by > pgaccess. We also > tried to change the table properties for the fields in > Access, "display as > checkbox" and so on. We drag the fields from the field list > into the form. > But also changing the ODBC-connected tables directly results > in the same > error. > > Isn't there a unique solution to that? Why are bools that critical? > > Thank you very much, > > Markus >