pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedCheckboxes on MSAccess and PostgreSQL
3+ messages / 2 participants
[nested] [flat]
* Checkboxes on MSAccess and PostgreSQL
@ 1999-01-18 17:11 Valerio Santinelli <tanis@mediacom.it>
1999-01-18 17:20 ` Re: [GENERAL] Checkboxes on MSAccess and PostgreSQL Byron Nikolaidis <byronn@insightdist.com>
1999-02-24 11:25 ` Re: [GENERAL] Checkboxes on MSAccess and PostgreSQL Valerio Santinelli <tanis@mediacom.it>
0 siblings, 2 replies; 3+ messages in thread
From: Valerio Santinelli @ 1999-01-18 17:11 UTC (permalink / raw)
To: pgsql-general@postgreSQL.org <pgsql-general@postgreSQL.org>
First of all.. thanks to everybody for helping me out witht the
"sequence" stuff. :)
I've got another questions for you dudes. When using a CheckBox in a
Form written in MSAccess that's related to a table in a
PostgreSQL database, if I simply turn its status from ON to OFF it works
fine, while if i'm doing the opposite it won't work.
I noticed that when exporting the table from MSAccess to PostgreSQL the
"yes/no" fields all became char(1) and not boolean.. maybe this could be
the problem.
I also noticed from the logs that when updating the status from ON to
OFF the UPDATE goes out with something like field_name='0'
I'm not sure it should use the "'" since it's more like a numerical, no
?
Thanks again,
Valerio Santinelli
tanis@mediacom.it
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [GENERAL] Checkboxes on MSAccess and PostgreSQL
1999-01-18 17:11 Checkboxes on MSAccess and PostgreSQL Valerio Santinelli <tanis@mediacom.it>
@ 1999-01-18 17:20 ` Byron Nikolaidis <byronn@insightdist.com>
1 sibling, 0 replies; 3+ messages in thread
From: Byron Nikolaidis @ 1999-01-18 17:20 UTC (permalink / raw)
To: Valerio Santinelli <tanis@mediacom.it>; +Cc: pgsql-general@postgreSQL.org <pgsql-general@postgreSQL.org>
Valerio Santinelli wrote:
> First of all.. thanks to everybody for helping me out witht the
> "sequence" stuff. :)
>
> I've got another questions for you dudes. When using a CheckBox in a
> Form written in MSAccess that's related to a table in a
> PostgreSQL database, if I simply turn its status from ON to OFF it works
> fine, while if i'm doing the opposite it won't work.
>
> I noticed that when exporting the table from MSAccess to PostgreSQL the
> "yes/no" fields all became char(1) and not boolean.. maybe this could be
> the problem.
>
> I also noticed from the logs that when updating the status from ON to
> OFF the UPDATE goes out with something like field_name='0'
> I'm not sure it should use the "'" since it's more like a numerical, no
> ?
>
Try setting the Advanced Driver Option "Bools as Char" to disabled. This
will cause the export to use a Boolean field in postgres.
Byron
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [GENERAL] Checkboxes on MSAccess and PostgreSQL
1999-01-18 17:11 Checkboxes on MSAccess and PostgreSQL Valerio Santinelli <tanis@mediacom.it>
@ 1999-02-24 11:25 ` Valerio Santinelli <tanis@mediacom.it>
1 sibling, 0 replies; 3+ messages in thread
From: Valerio Santinelli @ 1999-02-24 11:25 UTC (permalink / raw)
To: sferac@bo.nettuno.it; +Cc: pgsql-interfaces@postgresql.org, "pgsql-general@postgreSQL.org" <pgsql-general@postgresql.org>
Jose' Soares wrote:
> Valerio Santinelli wrote:
> >
> > First of all.. thanks to everybody for helping me out witht the
> > "sequence" stuff. :)
> >
> > I've got another questions for you dudes. When using a CheckBox in a
> > Form written in MSAccess that's related to a table in a
> > PostgreSQL database, if I simply turn its status from ON to OFF it works
> > fine, while if i'm doing the opposite it won't work.
> >
> > I noticed that when exporting the table from MSAccess to PostgreSQL the
> > "yes/no" fields all became char(1) and not boolean.. maybe this could be
> > the problem.
> >
> > I also noticed from the logs that when updating the status from ON to
> > OFF the UPDATE goes out with something like field_name='0'
> > I'm not sure it should use the "'" since it's more like a numerical, no
> > ?
> >
> > Thanks again,
> >
> > Valerio Santinelli
> > tanis@mediacom.it
>
> You have to uncheck "Bools as Char" on Advanced options Driver on ODBC
> Data Source Administrator
> and then you have to create an operator for bool=int4 like this:
>
> /* M$Access tratta il valore booleano come un intero 0=false o -1=true
> mentre invece PostgreSQL lo tratta come una stringa:
> 'true','t','1','y','yes','false','f','0','n','no'
> Questo script crea l'operatore = e implicitamente <> per bool e int4
> per compatibilita' con M$Access.
> */
> drop operator = (bool,int4);
> drop function MsAccessBool(bool,int4);
>
> create function MsAccessBool(bool,int4)
> returns bool
> as ''
> language 'internal';
>
> create operator = (
> leftarg=bool,
> rightarg=int4,
> procedure=MsAccessBool,
> commutator='=',
> negator='<>',
> restrict=eqsel,
> join=eqjoinsel
> );
Some time ago I got this message and I tried to make booleans work with my
database, but there's been no way to do that. First of all, during the
"DROP MsAccessBool" my PostgreSQL database engine reports that the function
can't be dropped because it's an internal (built-in).
Second, it seems to replace it by creating the function (i don't know how it
could if the function already exists..) but then again when I'm updating a
record in a table with booleans it simply doesn't let me do that. I'm
desperately seeking help now.. I don't really know how to solve this problem.
Thanks in advance
Valerio Santinelli
tanis@mediacom.it
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-02-24 11:25 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-18 17:11 Checkboxes on MSAccess and PostgreSQL Valerio Santinelli <tanis@mediacom.it>
1999-01-18 17:20 ` Byron Nikolaidis <byronn@insightdist.com>
1999-02-24 11:25 ` Valerio Santinelli <tanis@mediacom.it>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox