pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
C++ Builder (Delphi), ODBC and large objects
19+ messages / 6 participants
[nested] [flat]

* C++ Builder (Delphi), ODBC and large objects
@ 1998-10-20 07:25 angg <angg@vng.ru>
  1998-10-20 13:21 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects David Hartwig <daveh@insightdist.com>
  1998-10-21 13:24 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Byron Nikolaidis <byronn@insightdist.com>
  0 siblings, 2 replies; 19+ messages in thread

From: angg @ 1998-10-20 07:25 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

I have problem using large objects with C++ Builder.
When client side writes to the database psqlodbc.log reports that 0-value is
inserted into large-object field.
When client try to read data from the psqlodbc.log reports "Couldnt open
large object for reading"
I've asked this question to the mailin list already, but nobody answers.
Perhaps because I wrote too long request. Now I ask to answer several simple
questions:
1 Does anybody use large objects with C++ Builder (Delphi), BDE, ODBC,
PostgreSQL?
2 Does anybody know (or suspect) who (C++ Builder (Delphi), BDE, ODBC or
PostgreSQL) is responcible for the error?
3 Can anybody give me patch OR algorithm OR idea OR source for info OR hint
to solve the problem.
Thank you, Mikhail.






^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-20 07:25 C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
@ 1998-10-20 13:21 ` David Hartwig <daveh@insightdist.com>
  1998-10-20 15:02   ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
  1 sibling, 1 reply; 19+ messages in thread

From: David Hartwig @ 1998-10-20 13:21 UTC (permalink / raw)
  To: angg <angg@vng.ru>; +Cc: pgsql-interfaces@hub.org



angg wrote:

> I have problem using large objects with C++ Builder.
> When client side writes to the database psqlodbc.log reports that 0-value is
> inserted into large-object field.
> When client try to read data from the psqlodbc.log reports "Couldnt open
> large object for reading"
> I've asked this question to the mailin list already, but nobody answers.

I must confess, this is the first I email on ODBC large objects I recall seeing
in a while.

> Perhaps because I wrote too long request. Now I ask to answer several simple
> questions:
> 1 Does anybody use large objects with C++ Builder (Delphi), BDE, ODBC,
> PostgreSQL?

Yes, occasionally - without any problem.

> 2 Does anybody know (or suspect) who (C++ Builder (Delphi), BDE, ODBC or
> PostgreSQL) is responcible for the error?

No.

> 3 Can anybody give me patch OR algorithm OR idea OR source for info OR hint
> to solve the problem.

Have you seen http://www.insightdist.com/psqlodbc/psqlodbc_faq.html#largeobjects

There is also a contribution to the 6.4 source tree which sets up triggers to
remove orphaned large objects.





^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-20 07:25 C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
  1998-10-20 13:21 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects David Hartwig <daveh@insightdist.com>
@ 1998-10-20 15:02   ` Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
  1998-10-20 15:38     ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects David Hartwig <daveh@insightdist.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Andrzej Szydlo @ 1998-10-20 15:02 UTC (permalink / raw)
  To: David Hartwig <daveh@insightdist.com>; +Cc: pgsql-interfaces@hub.org



On Tue, 20 Oct 1998, David Hartwig wrote:

> 
> 
> angg wrote:
> 
> > I have problem using large objects with C++ Builder.
> > When client side writes to the database psqlodbc.log reports that 0-value is
> > inserted into large-object field.
> > When client try to read data from the psqlodbc.log reports "Couldnt open
> > large object for reading"
> > I've asked this question to the mailin list already, but nobody answers.
> 
> I must confess, this is the first I email on ODBC large objects I recall seeing
> in a while.
> 
> > Perhaps because I wrote too long request. Now I ask to answer several simple
> > questions:
> > 1 Does anybody use large objects with C++ Builder (Delphi), BDE, ODBC,
> > PostgreSQL?
> 
> Yes, occasionally - without any problem.

Do you mean BLOB+ODBC+BDE+Delphi worked for you with no problems?
And you accessed BLOBs using TTable or TQuery in Delphi? What were your
ODBC and BDE settings?

Andrzej




^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-20 07:25 C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
  1998-10-20 13:21 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects David Hartwig <daveh@insightdist.com>
  1998-10-20 15:02   ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
@ 1998-10-20 15:38     ` David Hartwig <daveh@insightdist.com>
  1998-10-21 07:06       ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
  0 siblings, 1 reply; 19+ messages in thread

From: David Hartwig @ 1998-10-20 15:38 UTC (permalink / raw)
  To: Andrzej Szydlo <andrzej@maciek.gv.edu.pl>; +Cc: pgsql-interfaces@hub.org



Andrzej Szydlo wrote:

> On Tue, 20 Oct 1998, David Hartwig wrote:
>
> >
> >
> > angg wrote:
> >
> > > I have problem using large objects with C++ Builder.
> > > When client side writes to the database psqlodbc.log reports that 0-value is
> > > inserted into large-object field.
> > > When client try to read data from the psqlodbc.log reports "Couldnt open
> > > large object for reading"
> > > I've asked this question to the mailin list already, but nobody answers.
> >
> > I must confess, this is the first I email on ODBC large objects I recall seeing
> > in a while.
> >
> > > Perhaps because I wrote too long request. Now I ask to answer several simple
> > > questions:
> > > 1 Does anybody use large objects with C++ Builder (Delphi), BDE, ODBC,
> > > PostgreSQL?
> >
> > Yes, occasionally - without any problem.
>
> Do you mean BLOB+ODBC+ worked for you with no problems?
> And you accessed BLOBs using TTable or TQuery in Delphi? What were your
> ODBC and BDE settings?
>
> Andrzej

 Apologies.  There is a problem with BLOG+BDE+Delphi.    Other applications that I
have used don't have any problems.   Byron is looking at it now.




^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-20 07:25 C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
  1998-10-20 13:21 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects David Hartwig <daveh@insightdist.com>
  1998-10-20 15:02   ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
  1998-10-20 15:38     ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects David Hartwig <daveh@insightdist.com>
@ 1998-10-21 07:06       ` Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
  0 siblings, 0 replies; 19+ messages in thread

From: Andrzej Szydlo @ 1998-10-21 07:06 UTC (permalink / raw)
  To: David Hartwig <daveh@insightdist.com>; +Cc: pgsql-interfaces@hub.org



On Tue, 20 Oct 1998, David Hartwig wrote:

> 
> 
> Andrzej Szydlo wrote:
> 
> > On Tue, 20 Oct 1998, David Hartwig wrote:
> >

[...]

> >
> > Do you mean BLOB+ODBC+ worked for you with no problems?
> > And you accessed BLOBs using TTable or TQuery in Delphi? What were your
> > ODBC and BDE settings?
> >
> 
>  Apologies.  There is a problem with BLOG+BDE+Delphi.    Other applications that I
> have used don't have any problems.   Byron is looking at it now.

We've found out by now that Delphi has no problems getting and putting
BLOBs using direct BDE API calls. The problem seems to be in the Delphi
components library, but there's no source available to trace and correct
it. Let me know if you think we might be helpful in this matter in any
way.

Andrzej




^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-20 07:25 C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
@ 1998-10-21 13:24 ` Byron Nikolaidis <byronn@insightdist.com>
  1 sibling, 0 replies; 19+ messages in thread

From: Byron Nikolaidis @ 1998-10-21 13:24 UTC (permalink / raw)
  To: angg <angg@vng.ru>; +Cc: pgsql-interfaces@hub.org



angg wrote:

> I have problem using large objects with C++ Builder.
> When client side writes to the database psqlodbc.log reports that 0-value is
> inserted into large-object field.
> When client try to read data from the psqlodbc.log reports "Couldnt open
> large object for reading"
> I've asked this question to the mailin list already, but nobody answers.
> Perhaps because I wrote too long request. Now I ask to answer several simple
> questions:
> 1 Does anybody use large objects with C++ Builder (Delphi), BDE, ODBC,
> PostgreSQL?
> 2 Does anybody know (or suspect) who (C++ Builder (Delphi), BDE, ODBC or
> PostgreSQL) is responcible for the error?
> 3 Can anybody give me patch OR algorithm OR idea OR source for info OR hint
> to solve the problem.
> Thank you, Mikhail.


Please send me the psqlodbc.log files showing both the "0-value" error and the
"couldn't open large object for reading".

Also, send the odbc trace log files (sql.log) as well showing the results of
both the read and write attempts.  Make sure the log file is clean before you
begin.

Byron




^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-21 04:23 angg <angg@vng.ru>
  0 siblings, 0 replies; 19+ messages in thread

From: angg @ 1998-10-21 04:23 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org


David Hartwig (DH) wrote:
ANGG wrote:

ANGG>> 1 Does anybody use large objects with C++ Builder (Delphi), BDE,
ODBC,
ANGG>> PostgreSQL?

DH>Yes, occasionally - without any problem.

WHO?!!! Answer me, please (the problem makes me trow out half a year's work
as useless garbage).

DH>Have you seen
DH> http://www.insightdist.com/psqlodbc/psqlodbc_faq.html#largeobjects

Yes, I create large object as it reccomends
create type lo (
    internallength=4,  externallength=10,
    input=int4in, output=int4out,
    default='',  passedbyvalue
);
and have all the problems I say here about.

By the way, PostgreSQL's man create_type recommends another way to create
the large object type:
create type bigobj (
  input = lo_filein,
  output = lo_fileout,
  internallength = variable
);

But I have no Idea how should I implement lo_infile and lo_outfile. Can
anybody tell me how, or point to the information source.

Thank you, Mikhail.








^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-21 08:16 angg <angg@vng.ru>
  1998-10-21 16:44 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>
  0 siblings, 1 reply; 19+ messages in thread

From: angg @ 1998-10-21 08:16 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

David Hartwig (DH) wrote:
ANGG wrote:

ANGG>> 1 Does anybody use large objects with C++ Builder (Delphi), BDE,
ODBC,
ANGG>> PostgreSQL?

DH>Yes, occasionally - without any problem.

WHO?!!! Answer me, please (the problem makes me trow out half a year's work
as useless garbage)

DH>Have you seen
DH> http://www.insightdist.com/psqlodbc/psqlodbc_faq.html#largeobjects

Yes, I create large object as it reccomends
create type lo

    internallength=4,  externallength=10,
    input=int4in, output=int4out,
    default='',  passedbyvalue
);
and have all the problems I say here about.

By the way, PostgreSQL's man create_type recommends another way to create
the large object type:
create type bigobj (
  input = lo_filein,
  output = lo_fileout,
  internallength = variable
);

Can anybody tell me how should I implement lo_filein and lo_fileout in this
case?

Thank you, Mikhail.







^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-21 08:16 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
@ 1998-10-21 16:44 ` Sergio <ser@perio.unlp.edu.ar>
  1998-10-21 21:53   ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Byron Nikolaidis <byronn@insightdist.com>
  0 siblings, 1 reply; 19+ messages in thread

From: Sergio @ 1998-10-21 16:44 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

Hi,
I have another problem with lo, I used the new Insight Odbc
driver and when I try to use the datapump utility of Borland
(Delphi) to migrate paradox tables, when it try to convert
memo fields to large objects it gave an error, wich NOT
happen with the previous version of the driver.
I resolved changing the type of the target field to
varchar.

Btw, any plans to support scrollable cursors and ODBC 3
from Insight ?

TIA,
Sergio Kessler

PS: rh5.1, Psql 6.3.2 and win odbc driver from this month.




^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-21 08:16 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
  1998-10-21 16:44 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>
@ 1998-10-21 21:53   ` Byron Nikolaidis <byronn@insightdist.com>
  1998-10-22 18:45     ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>
  1998-10-22 19:50     ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>
  0 siblings, 2 replies; 19+ messages in thread

From: Byron Nikolaidis @ 1998-10-21 21:53 UTC (permalink / raw)
  To: Sergio <ser@perio.unlp.edu.ar>; +Cc: pgsql-interfaces@hub.org



Sergio wrote:

> Hi,
> I have another problem with lo, I used the new Insight Odbc
> driver and when I try to use the datapump utility of Borland
> (Delphi) to migrate paradox tables, when it try to convert
> memo fields to large objects it gave an error, wich NOT
> happen with the previous version of the driver.
> I resolved changing the type of the target field to
> varchar.
>

I haven't had any success figuring out why Borland products can't write
blobs.  Maybe you could send me logfiles of the problems (both sql.log
and psqlodbc.log).

> Btw, any plans to support scrollable cursors and ODBC 3
> from Insight ?

I don't see any real need to support ODBC 3.0.  This would be quite an
involved project for very little gain as far as I can tell.  The driver
manager seems to do a good job of down converting the 3.0 calls to
2.0.   Is there something specific in 3.0 that you need or something?

As for scrollable cursors, "static" scrollable cursors are already
supported.   If you want positioned update/delete, the driver can work
with the odbc cursor library to achieve that.  As for dynamic or keyset
cursors, I had plans to implement a mixed keyset cursor (similar to what
the Jet engine does), but time is a problem.

Byron






^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-21 08:16 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
  1998-10-21 16:44 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>
  1998-10-21 21:53   ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Byron Nikolaidis <byronn@insightdist.com>
@ 1998-10-22 18:45     ` Sergio <ser@perio.unlp.edu.ar>
  1 sibling, 0 replies; 19+ messages in thread

From: Sergio @ 1998-10-22 18:45 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

Byron Nikolaidis <byronn@insightdist.com> el día Wed, 21 Oct 1998 17:53:13 
-0400, escribió:

>
>
>Sergio wrote:
>
>> Hi,
>> I have another problem with lo, I used the new Insight Odbc
>> driver and when I try to use the datapump utility of Borland
>> (Delphi) to migrate paradox tables, when it try to convert
>> memo fields to large objects it gave an error, wich NOT
>> happen with the previous version of the driver.
>> I resolved changing the type of the target field to
>> varchar.
>>
>
>I haven't had any success figuring out why Borland products can't write
>blobs.  Maybe you could send me logfiles of the problems (both sql.log
>and psqlodbc.log).

I don't have the files with me right now, I will try tomorow.
But the strange thing is that it not happen with the previous driver.

>> Btw, any plans to support scrollable cursors and ODBC 3
>> from Insight ?
>
>I don't see any real need to support ODBC 3.0.  This would be quite an
>involved project for very little gain as far as I can tell.  The driver
>manager seems to do a good job of down converting the 3.0 calls to
>2.0.   Is there something specific in 3.0 that you need or something?

Well, I have a couple of delphi componentes that talk directly
to the driver bypassing the BDE (because I hate to distribute the BDE),
and it say is for Odbc 3.
See the attachments, I've managed to convince the author to release
the source in the next version :)

>As for scrollable cursors, "static" scrollable cursors are already
>supported.   If you want positioned update/delete, the driver can work
>with the odbc cursor library to achieve that.  As for dynamic or keyset
>cursors, I had plans to implement a mixed keyset cursor (similar to what
>the Jet engine does), but time is a problem.

The same here, all the components (Odbc98, OdbcExpress) expect (or work 
better with) scrollable cursors in the driver, but I guess I can live
with this.

Cheers,
Sergio Kessler

Attachments:

  modbc2.zip (application/x-zip-compressed, 53.3K) download

^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-21 08:16 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
  1998-10-21 16:44 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>
  1998-10-21 21:53   ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Byron Nikolaidis <byronn@insightdist.com>
@ 1998-10-22 19:50     ` Sergio <ser@perio.unlp.edu.ar>
  1 sibling, 0 replies; 19+ messages in thread

From: Sergio @ 1998-10-22 19:50 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

Byron Nikolaidis <byronn@insightdist.com> el día Wed, 21 Oct 1998 17:53:13 
-0400, escribió:

>
>
>Sergio wrote:
>
>> Hi,
>> I have another problem with lo, I used the new Insight Odbc
>> driver and when I try to use the datapump utility of Borland
>> (Delphi) to migrate paradox tables, when it try to convert
>> memo fields to large objects it gave an error, wich NOT
>> happen with the previous version of the driver.
>> I resolved changing the type of the target field to
>> varchar.
>>
>
>I haven't had any success figuring out why Borland products can't write
>blobs.  Maybe you could send me logfiles of the problems (both sql.log
>and psqlodbc.log).

I don't have this files with me right now.

>> Btw, any plans to support scrollable cursors and ODBC 3
>> from Insight ?
>
>I don't see any real need to support ODBC 3.0.  This would be quite an
>involved project for very little gain as far as I can tell.  The driver
>manager seems to do a good job of down converting the 3.0 calls to
>2.0.   Is there something specific in 3.0 that you need or something?

Well, I have a freeware components (mOdbc) that talk to the odbc 
directly bypassing the BDE (because I hate to distribute the BDE) 
but it is made for 3.0 drivers, if you want this comps, just tell me.
Btw, I've managed to convince the author to release the source 
code :)

>As for scrollable cursors, "static" scrollable cursors are already
>supported.   If you want positioned update/delete, the driver can work
>with the odbc cursor library to achieve that.  As for dynamic or keyset
>cursors, I had plans to implement a mixed keyset cursor (similar to what
>the Jet engine does), but time is a problem.

The same happen here, all 3 party components want (or work better with)
dynamic scrollable cursors, I'm talking about odbc98 
(http://www.odbc98.com) or OdbcExpress (http://www.odbcexpress.com),
but maybe I choose mOdbc.

Cheers,
Sergio




^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-22 06:00 angg <angg@vng.ru>
  1998-10-22 18:57 ` Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>
  0 siblings, 1 reply; 19+ messages in thread

From: angg @ 1998-10-22 06:00 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

22 .10.1998 Sergio <ser@perio.unlp.edu.ar> wrote:

>Hi,
>I have another problem with lo, I used the new Insight Odbc
>driver and when I try to use the datapump utility of Borland
>(Delphi) to migrate paradox tables, when it try to convert
>memo fields to large objects it gave an error, wich NOT
>happen with the previous version of the driver.
>I resolved changing the type of the target field to
>varchar.

Do you mean you can create a table with a large obect field and insert data
there from Delphi? If so couldn't you send me your BDE, ODBC setting and
SQLs for creating large object type.

Thank you, Mikhail.








^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
  1998-10-22 06:00 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
@ 1998-10-22 18:57 ` Sergio <ser@perio.unlp.edu.ar>
  0 siblings, 0 replies; 19+ messages in thread

From: Sergio @ 1998-10-22 18:57 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org

"angg" <angg@vng.ru> el día Thu, 22 Oct 1998 11:00:32 +0500, escribió:

>22 .10.1998 Sergio <ser@perio.unlp.edu.ar> wrote:
>
>>Hi,
>>I have another problem with lo, I used the new Insight Odbc
>>driver and when I try to use the datapump utility of Borland
>>(Delphi) to migrate paradox tables, when it try to convert
>>memo fields to large objects it gave an error, wich NOT
>>happen with the previous version of the driver.
>>I resolved changing the type of the target field to
>>varchar.
>
>Do you mean you can create a table with a large obect field and insert data
>there from Delphi? If so couldn't you send me your BDE, ODBC setting and
>SQLs for creating large object type.

I mean that the datapump (data migration wizard) try to convert a memo
field (from a px table) to lo (I guess asking to the driver) and fail 
to do it, but when you tell to datapump 'hey, convert the memo fields 
to varchar' it success.

This is not a big problem for me, because the workaround is very easy,
but the default behavior is failing.

Sergio




^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-22 07:01 angg <angg@vng.ru>
  0 siblings, 0 replies; 19+ messages in thread

From: angg @ 1998-10-22 07:01 UTC (permalink / raw)
  To: byronn@insightdist.com; +Cc: pgsql-interfaces@hub.org

21.10.1998 Byron Nikolaidis wrote:

>Please send me the psqlodbc.log files showing both the "0-value" error and
the
>"couldn't open large object for reading".

I have type 'lo' created
CREATE TYPE lo (
  internallength=4,
  externallength=10,
  input=int4in,
  output=int4out,
  default='',
  passedbyvalue
);
as it is recomended in
http://www.insightdist.com/psqlodbc/psqlodbc_faq.html#largeobjects

and a table
CREATE TABLE tmp_rq (
  req_id      int2,
  req_content lo
);
I manually (to simplify debugging) insert record with req_id = 1.
In my application I have an SQL (RequestLive),
SELECT req_id, req_content FROM tmp_rq WHERE req_id = 1;
It  binded to TDBRichEdit (TDBMemo) component.

I run the application, write text (long) to the large object field
fromTDBRichEdit, and exit.
I'm attaching psqlodbc.log file renaming it to WriteData.log

Then run the application again try to read data from large object field by
TDBRichEdit (nothing is showed), and exit.
This time I renamed psqlodbc.log file to ReadAfterWriteData.log

I can see there are some information you don't need, but I decided to leave
the files as is not to remove something valuable by ignorance.

>Also, send the odbc trace log files (sql.log) as well showing the results
of
>both the read and write attempts.  Make sure the log file is clean before
you begin.

In both cases described above sql.log file was emty. To try to get the files
I did the following:

In MS 32-bit ODBC I checked
"All the time" ("When to trace" on "Tracing" page)" and press "Start tracing
Now" button.
In ODBC Administrator (PostOdbc driver) I set Trace mode = 0x0040

Here is quoting from "ODBC driver connection settings" help:
TRACE MODE A numeric value (bit mask) specifying how much trace information
to log. The Windows OutputDebugString call is used to output the requested
information to the debug window. The following table shows which information
is logged based on bit settings:
Bit Settings Logged Information
0x0001 prepared query statement
0x0002 executed query statements
0x0004 vendor errors
0x0008 statement options (that is: allocate, free)
0x0010 connect / disconnect
0x0020 transaction
0x0040 BLOB I/O
0x0080 miscellaneous
0x0100 vendor calls

But I do get 488 KB sql.log file when I create large object.
I'm not attaching it because I don't know whether you need it. If you do
I'll send it too.

I got a message from Sergey E. Levov <serg@informika.ru>
he writes:
>If you have sources try the follwing:
>Find the string
>       if (pcbValue && *pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET)
>in the file bind.c and change it into
>       if (pcbValue && ((*pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET) ||
>                        (*pcbValue == SQL_DATA_AT_EXEC)))
>and rebuild the driver. Perhaps it help.

I downloaded sources from www.insightdist.com/psqlodbc.
Unfortunatelly I need MS Visual C++ 4.0 to rebuild the driver which I
haven't. I am seeking an opportunity to do the job now.


Thank you, Mikhail.

Attachments:

  WrteData.log (application/octet-stream, 15.8K) download

  ReadAfterWriteData.log (application/octet-stream, 17.6K) download

^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-22 07:03 Andrzej Szydlo <andrzej@gv.edu.pl>
  0 siblings, 0 replies; 19+ messages in thread

From: Andrzej Szydlo @ 1998-10-22 07:03 UTC (permalink / raw)
  To: Byron Nikolaidis <byronn@insightdist.com>; +Cc: pgsql-interfaces@hub.org

Hello Byron,

On  Wed, 21 Oct 1998 17:53:13 -0400, Byron Nikolaidis wrote:

> 
> I haven't had any success figuring out why Borland products can't write
> blobs.  Maybe you could send me logfiles of the problems (both sql.log
> and psqlodbc.log).

We've found out, that the problem is in Delphi itself (and probably 
other Borland's products as well). Seems that Delphi components 
responsible for BLOBs handling call BDE incorrectly. We managed to 
make a workaround by calling BDE API manually instead of using 
components provided by Borland. It works, but make programming much 
more complicated, or at least much slower.

Unfortunately we are unable to compile this workaround into the 
components library to fix the problem because Borland/Inprise doesn't 
provide any source code for this part of their library.

Do you think we (PostgreSQL + Borland users) could influence Borland 
to solve this problem? They only need to include our routines into 
their library or just make some sorce code available (they released 
it for many other components in thier library) to allow us to fix it.

Andrzej



^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-22 14:59 Byron Nikolaidis <byronn@insightdist.com>
  0 siblings, 0 replies; 19+ messages in thread

From: Byron Nikolaidis @ 1998-10-22 14:59 UTC (permalink / raw)
  To: angg <angg@vng.ru>; +Cc: pgsql-interfaces



angg wrote:

> Byron, I tried to build driver with MS Visual C++ 5.0, but the proces failed
> with the following messages:
> [...]
> C:\Program Files\DevStudio\MyProjects\psqlodbc\execute.c(132) : warning
> C4229: anachronism used : modifiers on data are ignored
> gpps.c
> info.c
> C:\Program Files\DevStudio\MyProjects\psqlodbc\info.c(846) : error C2065:
> 'SQL_NUM_FUNCTIONS' : undeclared identifier
> C:\Program Files\DevStudio\MyProjects\psqlodbc\info.c(848) : error C2065:
> 'SQL_EXT_API_START' : undeclared identifier
> C:\Program Files\DevStudio\MyProjects\psqlodbc\info.c(848) : error C2065:
> 'SQL_EXT_API_LAST' : undeclared identifier
> [...]
>
> It isn't my compiler so I'm not sure it was installed properly. So far as
> can understand some *.h files are absent. Can you tell me which. I'm now
> seeking another opportunity to build the driver. I work to the North of
> Russia and it isn't a simple task :-).
>
> Mikhail.

Since I use VC4.0, which includes the old sql include files, there is not a
problem.

On VC5.0, the newer odbc 3.0 sql include files are used.  Therefore, the driver
needs to specify the ODBCVER explicitly, otherwise it defaults to 3.0 which is
the problem.

Solution:

1.  Somewhere in "psqlodbc.h", add the following line:

# define ODBCVER   0x0200

2. In connection.h, move the #include "psqlodbc.h" to prior to #ifdef HAVE_IODBC

3. In statement.h, move the #include "psqlodbc.h" to prior to #ifdef HAVE_IODBC

4. In convert.c, add the line #include "psqlodbc.h" prior to #ifdef HAVE_IODBC


As for the anachronism thing, you can either ignore it or just remove the
SQL_API keyword.


I will try to get these corrections into the next release.

Thanks,

Byron





^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-23 02:38 angg <angg@vng.ru>
  0 siblings, 0 replies; 19+ messages in thread

From: angg @ 1998-10-23 02:38 UTC (permalink / raw)
  To: byronn@insightdist.com; +Cc: pgsql-interfaces@hub.org

21.10.1998 Byron Nikolaidis wrote:

>Please send me the psqlodbc.log files showing both the "0-value" error and
the
>"couldn't open large object for reading".

I have type 'lo' created
CREATE TYPE lo (
  internallength=4,
  externallength=10,
  input=int4in,
  output=int4out,
  default='',
  passedbyvalue
);
as it is recomended in
http://www.insightdist.com/psqlodbc/psqlodbc_faq.html#largeobjects

and a table
CREATE TABLE tmp_rq (
  req_id      int2,
  req_content lo
);
I manually (to simplify debugging) insert record with req_id = 1.
In my application I have an SQL (RequestLive),
SELECT req_id, req_content FROM tmp_rq WHERE req_id = 1;
It  binded to TDBRichEdit (TDBMemo) component.

I run the application, write text (long) to the large object field
fromTDBRichEdit, and exit.
I'm attaching psqlodbc.log file renaming it to WriteData.log

Then run the application again try to read data from large object field by
TDBRichEdit (nothing is showed), and exit.
This time I renamed psqlodbc.log file to ReadAfterWriteData.log

I can see there are some information you don't need, but I decided to leave
the files as is not to remove something valuable by ignorance.

>Also, send the odbc trace log files (sql.log) as well showing the results
of
>both the read and write attempts.  Make sure the log file is clean before
you begin.

In both cases described above sql.log file was emty. To try to get the files
I did the following:

In MS 32-bit ODBC I checked
"All the time" ("When to trace" on "Tracing" page)" and press "Start tracing
Now" button.
In ODBC Administrator (PostOdbc driver) I set Trace mode = 0x0040

Here is quoting from "ODBC driver connection settings" help:
TRACE MODE A numeric value (bit mask) specifying how much trace information
to log. The Windows OutputDebugString call is used to output the requested
information to the debug window. The following table shows which information
is logged based on bit settings:
Bit Settings Logged Information
0x0001 prepared query statement
0x0002 executed query statements
0x0004 vendor errors
0x0008 statement options (that is: allocate, free)
0x0010 connect / disconnect
0x0020 transaction
0x0040 BLOB I/O
0x0080 miscellaneous
0x0100 vendor calls

But I do get 488 KB sql.log file when I create large object.
I'm not attaching it because I don't know whether you need it. If you do
I'll send it too.

I got a message from Sergey E. Levov <serg@informika.ru>
he writes:
>If you have sources try the follwing:
>Find the string
>       if (pcbValue && *pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET)
>in the file bind.c and change it into
>       if (pcbValue && ((*pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET) ||
>                        (*pcbValue == SQL_DATA_AT_EXEC)))
>and rebuild the driver. Perhaps it help.

I downloaded sources from www.insightdist.com/psqlodbc.
Unfortunatelly I need MS Visual C++ 4.0 to rebuild the driver which I
haven't. I am seeking an opportunity to do the job now.


Thank you, Mikhail.

Attachments:

  WrteData.log (application/octet-stream, 15.8K) download

  ReadAfterWriteData.log (application/octet-stream, 17.6K) download

^ permalink  raw  reply  [nested|flat] 19+ messages in thread

* Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects
@ 1998-10-23 05:51 Sergio <ser@perio.unlp.edu.ar>
  0 siblings, 0 replies; 19+ messages in thread

From: Sergio @ 1998-10-23 05:51 UTC (permalink / raw)
  To: pgsql-interfaces@hub.org


>Sergio wrote:

>> well, then the only thing that I can tell is that no one of the three
>> set of components that I tryed (mOdbc, odbc98, OdbcExpress) work well
>> with the pg odbc driver, and yes, I've configured it for odbc cursor
>> library and tryed all kinds of setup.
>>
>
>I corrected some things in the odbc driver to work better with OdbcExpress. 
 The
>latest version (.250) of our driver has at least 2 fixes that were prompted 
by
>OdbcExpress.
>
>I know that odbcexpress talks to the driver manager, which converts the 3.0
>calls to 2.0 calls.
>
>When you say, OdbcExpress doesn't work well with the driver, what exactly 
is the
>problem?  Can you be specific, and show log files, etc.

Well, my previous problem ('[Microsoft][ODBC driver manager] Fetch 
type out of range') dissappear when I changed the option 
hStm -> CursorType from Keyset Driven to Static.
Now when I try to edit a field in a DBGrid and when I post this 
message is raised:
'[Microsoft][ODBC cursor library] Syntax error or access violation'
and I can't post it.

But I don't worry any more about Odbc98 nor OdbcExpress, now I'm 
comitted to mOdbc because the author is willing to release the 
sources.

Btw, using mOdbc this error is raised when I launch the app:
'[Microsoft][ODBC driver manager] The driver doesn't support 
the version of ODBC behavior that the application requested 
(See SQLSetEnvAttr)', and then say:
'[Microsoft][Odbc curosr library] HSTMT bindings may not be
changed while a cursor is open'
but it open the table and show the result of the query normally.
I'm using it with ODBC cursor library and static cursors.

The Home page of mOdbc is http://www.chat.ru/~ksav
it work in Delphi 3 and BCB 3.

Sergio

PS: I don't see any strange in the log files, but if you want it
anyway, tell me and I'll send it to you.
Btw, this mailing list accept attachs ?




^ permalink  raw  reply  [nested|flat] 19+ messages in thread


end of thread, other threads:[~1998-10-23 05:51 UTC | newest]

Thread overview: 19+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-10-20 07:25 C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
1998-10-20 13:21 ` David Hartwig <daveh@insightdist.com>
1998-10-20 15:02   ` Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
1998-10-20 15:38     ` David Hartwig <daveh@insightdist.com>
1998-10-21 07:06       ` Andrzej Szydlo <andrzej@maciek.gv.edu.pl>
1998-10-21 13:24 ` Byron Nikolaidis <byronn@insightdist.com>
1998-10-21 04:23 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
1998-10-21 08:16 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
1998-10-21 16:44 ` Sergio <ser@perio.unlp.edu.ar>
1998-10-21 21:53   ` Byron Nikolaidis <byronn@insightdist.com>
1998-10-22 18:45     ` Sergio <ser@perio.unlp.edu.ar>
1998-10-22 19:50     ` Sergio <ser@perio.unlp.edu.ar>
1998-10-22 06:00 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
1998-10-22 18:57 ` Sergio <ser@perio.unlp.edu.ar>
1998-10-22 07:01 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
1998-10-22 07:03 Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Andrzej Szydlo <andrzej@gv.edu.pl>
1998-10-22 14:59 Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Byron Nikolaidis <byronn@insightdist.com>
1998-10-23 02:38 [INTERFACES] C++ Builder (Delphi), ODBC and large objects angg <angg@vng.ru>
1998-10-23 05:51 Re: [INTERFACES] C++ Builder (Delphi), ODBC and large objects Sergio <ser@perio.unlp.edu.ar>

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