Thread: C++ builder + ADO + podbcsql (7.01.0007)

C++ builder + ADO + podbcsql (7.01.0007)

From
xoror@infuse.org
Date:
hi,

I've just starting to use postgresql. Currently i'm migrating a mysql
application to postgres. However i've encountered some strange things.

I'm using c++ builder 5.0. I use ADO + ODBC to access postgresql (7.1.3
cygwin). i've read the faq and uncheck some options concerning to varchar
and stuff. but I still have problems with text type. If one of my colomn
is a text type, and when i try to edit it with a data-aware component, i
get this error : expecting memo, actual string.

now that's weird since that column is defined as a text type. it should be
regcognise as memo. is this a bug ? (or known flaw?)
(i've also tried zeosDBO, it works great, but it has one major flaw, it
uses to much memory with multiple datasets. but zeosdbo does regcognise
that text field as memo)

the second weird thing is that i can enable logging but the driver
produces nog logfile :(
so i can't trace errors myself.
the whole thing runs on win2000 sp2.

hope anyone can help me.

thnx in advance


Re: C++ builder + ADO + podbcsql (7.01.0007)

From
Hiroshi Inoue
Date:
xoror@infuse.org wrote:
>
> hi,
>
> I've just starting to use postgresql. Currently i'm migrating a mysql
> application to postgres. However i've encountered some strange things.
>
> I'm using c++ builder 5.0. I use ADO + ODBC to access postgresql (7.1.3
> cygwin). i've read the faq and uncheck some options concerning to varchar
> and stuff. but I still have problems with text type. If one of my colomn
> is a text type, and when i try to edit it with a data-aware component, i
> get this error : expecting memo, actual string.
>
> now that's weird since that column is defined as a text type. it should be
> regcognise as memo. is this a bug ? (or known flaw?)

Are you checking Text as LongVarChar option ?
If you are checking it, *text* would be treated as *memo*,
otherwise *text* would be treated as *text*.

> the second weird thing is that i can enable logging but the driver
> produces nog logfile :(

Which option are you enabling ?

regards,
Hiroshi Inoue

Re: C++ builder + ADO + podbcsql (7.01.0007)

From
xoror@infuse.org
Date:
On Thu, 11 Oct 2001, Hiroshi Inoue wrote:

> xoror@infuse.org wrote:
> >
> > hi,
> >
> > I've just starting to use postgresql. Currently i'm migrating a mysql
> > application to postgres. However i've encountered some strange things.
> >
> > I'm using c++ builder 5.0. I use ADO + ODBC to access postgresql (7.1.3
> > cygwin). i've read the faq and uncheck some options concerning to varchar
> > and stuff. but I still have problems with text type. If one of my colomn
> > is a text type, and when i try to edit it with a data-aware component, i
> > get this error : expecting memo, actual string.
> >
> > now that's weird since that column is defined as a text type. it should be
> > regcognise as memo. is this a bug ? (or known flaw?)
>
> Are you checking Text as LongVarChar option ?
> If you are checking it, *text* would be treated as *memo*,
> otherwise *text* would be treated as *text*.

I've read the FAQ and i unchecked Text as LongVarChar.

i've checked the option and everything works now. THANKS !!!
i suggest you'd better change the FAQ.

the FAQ is wrong in this case.

Data Type Options:
Uncheck Text as LongVarchar
Uncheck Unknowns as LongVarchar

i think it would help a lot of borland if this was fixed :)

> > the second weird thing is that i can enable logging but the driver
> > produces nog logfile :(
>
> Which option are you enabling ?
>

i enabled c:\psqlodbc.log and mylog thing. but to no avail.


Re: C++ builder + ADO + podbcsql (7.01.0007)

From
Dave Page
Date:

> -----Original Message-----
> From: xoror@infuse.org [mailto:xoror@infuse.org]
> Sent: 11 October 2001 11:47
> To: pgsql-odbc@postgresql.org
> Subject: Re: [ODBC] C++ builder + ADO + podbcsql (7.01.0007)
>
>
> > > the second weird thing is that i can enable logging but
> the driver
> > > produces nog logfile :(
> >
> > Which option are you enabling ?
> >
>
> i enabled c:\psqlodbc.log and mylog thing. but to no avail.

Make sure that any apps that may have loaded psqlodbc.dll are restarted
after you change these options.

On one machine (out of many that I look after) I've seen a case on W2K where
the user didn't have the relevant permissions on
HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI\PostgreSQL (you can check this
using regedt32) - the driver happily allowed the user to change options, but
then didn't write the changes to the registry.

Regards, Dave.

Re: C++ builder + ADO + podbcsql (7.01.0007)

From
Hiroshi Inoue
Date:
xoror@infuse.org wrote:
>
> On Thu, 11 Oct 2001, Hiroshi Inoue wrote:
>
> > xoror@infuse.org wrote:
> > >
> > > hi,
> > >
> > > I've just starting to use postgresql. Currently i'm migrating a mysql
> > > application to postgres. However i've encountered some strange things.
> > >
> > > I'm using c++ builder 5.0. I use ADO + ODBC to access postgresql (7.1.3
> > > cygwin). i've read the faq and uncheck some options concerning to varchar
> > > and stuff. but I still have problems with text type. If one of my colomn
> > > is a text type, and when i try to edit it with a data-aware component, i
> > > get this error : expecting memo, actual string.
> > >
> > > now that's weird since that column is defined as a text type. it should be
> > > regcognise as memo. is this a bug ? (or known flaw?)
> >
> > Are you checking Text as LongVarChar option ?
> > If you are checking it, *text* would be treated as *memo*,
> > otherwise *text* would be treated as *text*.
>
> I've read the FAQ and i unchecked Text as LongVarChar.
>
> i've checked the option and everything works now. THANKS !!!
> i suggest you'd better change the FAQ.
>
> the FAQ is wrong in this case.
>
> Data Type Options:
> Uncheck Text as LongVarchar

Changed to *Check Text as LongVarChar*
Thanks.

> > > the second weird thing is that i can enable logging but the driver
> > > produces nog logfile :(
> >
> > Which option are you enabling ?
> >
>
> i enabled c:\psqlodbc.log and mylog thing. but to no avail.

There are 2 modes for setting the driver option.
Are you checking *per DSN* option ?

regards,
Hiroshi Inoue