Обсуждение: Boolean

Поиск
Список
Период
Сортировка

Boolean

От
"Ian"
Дата:

Hello

 

I am trying to use PostgreSQL as an alternative to MS SQL express.

But when my Delphi table opens, the Boolean field fails as it says that it expects Boolean but receives string.

 

How can I get Boolean to be a  BIT?

 

Thank you

 

Ian

 

Ian Burrows

 

07767 834329

CES Ltd.

11 Alverton Close

YO17 6RR

                                   Ces-ltd.co.uk                                                   https://ces-ltd.co.uk/the-croft-business-park/

                                  ceslogo2_small                                                              CroftBusinessPark small

 

 

 

Вложения

Re: Boolean

От
"Jack C. Wei"
Дата:
There's a "Bools as Char" option in psqlodbc. Try turning it off. If you're using DSN, the option is in page 1 of the Options dialog box. If you're using a connection string, add "BoolsAsChar=0;" to it. See https://odbc.postgresql.org/docs/config.html

Disclaimer: I've never used this option myself so can't say for sure. I actually use smallint instead of boolean in my design.



On Mon, Jul 27, 2020 at 7:40 AM Ian <ian@ces-ltd.co.uk> wrote:

Hello

 

I am trying to use PostgreSQL as an alternative to MS SQL express.

But when my Delphi table opens, the Boolean field fails as it says that it expects Boolean but receives string.

 

How can I get Boolean to be a  BIT?

 

Thank you

 

Ian

 

Ian Burrows

 

07767 834329

CES Ltd.

11 Alverton Close

YO17 6RR

                                   Ces-ltd.co.uk                                                   https://ces-ltd.co.uk/the-croft-business-park/

                                  ceslogo2_small                                                              CroftBusinessPark small

 

 

 

Вложения

RE: Boolean

От
"Ian"
Дата:

Hi All

 

Thanks for your help.

 

That worked great.

Now I have the same sort of problem with PostgreSQL Text types not filling MSSQL MEMO fields.

 

I’ve looked in the DSN definition but I didn’t see anything obvious.

 

Any ideas please?

 

Regards

Ian

 

 

From: Jack C. Wei [mailto:jackcwei+pgsql@gmail.com]
Sent: 27 July 2020 16:28
To: ian@ces-ltd.co.uk
Cc: pgsql-odbc@postgresql.org
Subject: Re: Boolean

 

There's a "Bools as Char" option in psqlodbc. Try turning it off. If you're using DSN, the option is in page 1 of the Options dialog box. If you're using a connection string, add "BoolsAsChar=0;" to it. See https://odbc.postgresql.org/docs/config.html

Disclaimer: I've never used this option myself so can't say for sure. I actually use smallint instead of boolean in my design.

 

 

 

On Mon, Jul 27, 2020 at 7:40 AM Ian <ian@ces-ltd.co.uk> wrote:

Hello

 

I am trying to use PostgreSQL as an alternative to MS SQL express.

But when my Delphi table opens, the Boolean field fails as it says that it expects Boolean but receives string.

 

How can I get Boolean to be a  BIT?

 

Thank you

 

Ian

 

Ian Burrows

 

07767 834329

CES Ltd.

11 Alverton Close

YO17 6RR

                                   Ces-ltd.co.uk                                                   https://ces-ltd.co.uk/the-croft-business-park/

                                  ceslogo2_small                                                              CroftBusinessPark small

 

 

 

Вложения

Re: Boolean

От
Roger De Four
Дата:
Ian,

Did you mean Axxess Memo field ?
From what I gathered SQL server doesn't explicitly have a MEMO field.




Best Regards

Roger De Four
Database Developer
RAD Financial Systems

Cell #/WhatsApp: +1-(868)-342-8587




On Mon, 27 Jul 2020 at 13:51, Ian <ian@ces-ltd.co.uk> wrote:

Hi All

 

Thanks for your help.

 

That worked great.

Now I have the same sort of problem with PostgreSQL Text types not filling MSSQL MEMO fields.

 

I’ve looked in the DSN definition but I didn’t see anything obvious.

 

Any ideas please?

 

Regards

Ian

 

 

From: Jack C. Wei [mailto:jackcwei+pgsql@gmail.com]
Sent: 27 July 2020 16:28
To: ian@ces-ltd.co.uk
Cc: pgsql-odbc@postgresql.org
Subject: Re: Boolean

 

There's a "Bools as Char" option in psqlodbc. Try turning it off. If you're using DSN, the option is in page 1 of the Options dialog box. If you're using a connection string, add "BoolsAsChar=0;" to it. See https://odbc.postgresql.org/docs/config.html

Disclaimer: I've never used this option myself so can't say for sure. I actually use smallint instead of boolean in my design.

 

 

 

On Mon, Jul 27, 2020 at 7:40 AM Ian <ian@ces-ltd.co.uk> wrote:

Hello

 

I am trying to use PostgreSQL as an alternative to MS SQL express.

But when my Delphi table opens, the Boolean field fails as it says that it expects Boolean but receives string.

 

How can I get Boolean to be a  BIT?

 

Thank you

 

Ian

 

Ian Burrows

 

07767 834329

CES Ltd.

11 Alverton Close

YO17 6RR

                                   Ces-ltd.co.uk                                                   https://ces-ltd.co.uk/the-croft-business-park/

                                  ceslogo2_small                                                              CroftBusinessPark small

 

 

 

Вложения

Re: Boolean

От
Roger De Four
Дата:
Sorry, meant MS ACCESS :: "Did you mean Axxess Memo field ?"


Best Regards

Roger De Four
Database Developer
RAD Financial Systems

Cell #/WhatsApp: +1-(868)-342-8587




On Mon, 27 Jul 2020 at 10:40, Ian <ian@ces-ltd.co.uk> wrote:

Hello

 

I am trying to use PostgreSQL as an alternative to MS SQL express.

But when my Delphi table opens, the Boolean field fails as it says that it expects Boolean but receives string.

 

How can I get Boolean to be a  BIT?

 

Thank you

 

Ian

 

Ian Burrows

 

07767 834329

CES Ltd.

11 Alverton Close

YO17 6RR

                                   Ces-ltd.co.uk                                                   https://ces-ltd.co.uk/the-croft-business-park/

                                  ceslogo2_small                                                              CroftBusinessPark small

 

 

 

Вложения

RE: Boolean

От
"Ian"
Дата:

Just following up on my Text WideString Memo problem.

Text as LongVarChar does not seem to work.

 

 

 

From: Roger De Four [mailto:radfinancialsystems@gmail.com]
Sent: 27 July 2020 19:00
To: ian@ces-ltd.co.uk
Cc: pgsql-odbc@postgresql.org
Subject: Re: Boolean

 

Sorry, meant MS ACCESS :: "Did you mean Axxess Memo field ?"

 

 

Best Regards

 

Roger De Four

Database Developer

RAD Financial Systems

 

Cell #/WhatsApp: +1-(868)-342-8587

 

 

 

On Mon, 27 Jul 2020 at 10:40, Ian <ian@ces-ltd.co.uk> wrote:

Hello

 

I am trying to use PostgreSQL as an alternative to MS SQL express.

But when my Delphi table opens, the Boolean field fails as it says that it expects Boolean but receives string.

 

How can I get Boolean to be a  BIT?

 

Thank you

 

Ian

 

Ian Burrows

 

07767 834329

CES Ltd.

11 Alverton Close

YO17 6RR

                                   Ces-ltd.co.uk                                                   https://ces-ltd.co.uk/the-croft-business-park/

                                  ceslogo2_small                                                              CroftBusinessPark small

 

 

 

Вложения

RE: Boolean

От
Danny Severns
Дата:

Have you tried changing your column on the PG table to VARCHAR without a length qualifier to see if that works?  I think TEXT in each of the two DBs have different practical max size limits which might account for the incompatibility error.  Theoretically, there should be no difference in the data types TEXT between the two DBs, nor between TEXT and VARCHAR without a length qualifier.  Perhaps there is a difference in the table metadata for the columns in each table for the different lengths or other attributes, as noted in your screen shot, and that triggers the incompatibility.  It might be worth a shot if you haven’t tried it.

 

 

From: Ian <ian@ces-ltd.co.uk>
Sent: Wednesday, July 29, 2020 5:37 AM
To: 'Roger De Four' <radfinancialsystems@gmail.com>
Cc: pgsql-odbc@postgresql.org
Subject: RE: Boolean

 

Just following up on my Text WideString Memo problem.

Text as LongVarChar does not seem to work.

 

 

 

From: Roger De Four [mailto:radfinancialsystems@gmail.com]
Sent: 27 July 2020 19:00
To: ian@ces-ltd.co.uk
Cc: pgsql-odbc@postgresql.org
Subject: Re: Boolean

 

Sorry, meant MS ACCESS :: "Did you mean Axxess Memo field ?"

 

 

Best Regards

 

Roger De Four

Database Developer

RAD Financial Systems

 

Cell #/WhatsApp: +1-(868)-342-8587

 

 

 

On Mon, 27 Jul 2020 at 10:40, Ian <ian@ces-ltd.co.uk> wrote:

Hello

 

I am trying to use PostgreSQL as an alternative to MS SQL express.

But when my Delphi table opens, the Boolean field fails as it says that it expects Boolean but receives string.

 

How can I get Boolean to be a  BIT?

 

Thank you

 

Ian

 

Ian Burrows

 

07767 834329

CES Ltd.

11 Alverton Close

YO17 6RR

                                   Ces-ltd.co.uk                                                   https://ces-ltd.co.uk/the-croft-business-park/

                                  ceslogo2_small                                                              CroftBusinessPark small

 

 

 

Вложения