pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Borland PQexec error in Windows XP
5+ messages / 3 participants
[nested] [flat]

* Borland PQexec error in Windows XP
@ 2004-06-22 21:57  G. van Wieringen <wieri420@planet.nl>
  0 siblings, 4 replies; 5+ messages in thread

From: G. van Wieringen @ 2004-06-22 21:57 UTC (permalink / raw)
  To: pgsql-interfaces

Hi all!

Just started my first borland+postgres project and within 5 minutes I found
the following problem:

This piece of code:
    char query[]  =
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
    res = PQexec(handle, query );
Gives me, as it should,  this error message:
ERROR: syntax error at or near
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" at
character 1

But this piece of code:
    char query[]  =
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
    res = PQexec(handle, query );

Gives me this Debugger Exeption Notification:
"Project Project1.exe raised exeption class EAccessViolation with message
'Access violation at address 32665A50 in module 'CC3260MT.DLL'. Read of
address F840C228'. Process stopped. Use Step or Run to continue."

Note that the first query is just 1 'a' shorter and it does not give the
Debugger Exeption.
Is it possible that PQexec or CC3260MT.DLL can not handle queries that begin
with more than 64 characters?

When I enter the query in psql (linux) on the database machine itelf, it
gives the notice:
NOTICE:  identifier "stringwithmorethan64chars" will be truncated to
"stringwith64chars"
(of course, the text between double quotes is not a part of the actual error
message )

I am using Borland C++ Builder 6 with libpq (compiled with borland from
postgres 7.4.3) under Windows XP.

All help is welcome!

G. van Wieringen
wieri420@planet.nl




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

* Re: Borland PQexec error in Windows XP
@ 2004-06-22 22:43  Tom Lane <tgl@sss.pgh.pa.us>
  parent: G. van Wieringen <wieri420@planet.nl>
  3 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2004-06-22 22:43 UTC (permalink / raw)
  To: G. van Wieringen <wieri420@planet.nl>; +Cc: pgsql-interfaces

"G. van Wieringen" <wieri420@planet.nl> writes:
> Is it possible that PQexec or CC3260MT.DLL can not handle queries that begin
> with more than 64 characters?

No; what's considerably more probable is that some part of that code
goes belly-up when trying to process a NOTICE from the backend.  By
default libpq tries to print notices on stderr; what will happen in
your environment when it does that?

			regards, tom lane



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

* Re: Borland PQexec error in Windows XP
@ 2004-06-23 00:17  L J Bayuk <ljb220@mindspring.com>
  parent: G. van Wieringen <wieri420@planet.nl>
  3 siblings, 0 replies; 5+ messages in thread

From: L J Bayuk @ 2004-06-23 00:17 UTC (permalink / raw)
  To: wieri420@planet.nl; +Cc: pgsql-interfaces

G. van Wieringen wrote:
> ...
>     res = PQexec(handle, query );
> 
> Gives me this Debugger Exeption Notification:
> "Project Project1.exe raised exeption class EAccessViolation with message
> 'Access violation at address 32665A50 in module 'CC3260MT.DLL'. Read of
> address F840C228'. Process stopped. Use Step or Run to continue."
> ...

Probably same issue as this:
  http://archives.postgresql.org/pgsql-interfaces/2004-04/msg00057.php



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

* Re: Borland PQexec error in Windows XP
@ 2004-06-23 06:15  G. van Wieringen <wieri420@planet.nl>
  parent: G. van Wieringen <wieri420@planet.nl>
  3 siblings, 0 replies; 5+ messages in thread

From: G. van Wieringen @ 2004-06-23 06:15 UTC (permalink / raw)
  To: G. van Wieringen <wieri420@planet.nl>; pgsql-interfaces

Hi all!

Thanks for the response!! My problem was similar to
http://archives.postgresql.org/pgsql-interfaces/2004-04/msg00057.php
Every time the server send a notice my application crashed.

The solution stated there, was that I should link the static version
ct32mt.lib with my project. It worked!!!





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

* Re: Borland PQexec error in Windows XP
@ 2004-06-23 06:23  G. van Wieringen <wieri420@planet.nl>
  parent: G. van Wieringen <wieri420@planet.nl>
  3 siblings, 0 replies; 5+ messages in thread

From: G. van Wieringen @ 2004-06-23 06:23 UTC (permalink / raw)
  To: pgsql-interfaces

Oops, sorry, got the name of the lib wrong....

You have to link cp32mt.lib with your project to solve the problem. (located
in C:\.....\Borland\CBuilder6\lib).






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


end of thread, other threads:[~2004-06-23 06:23 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-22 21:57 Borland PQexec error in Windows XP G. van Wieringen <wieri420@planet.nl>
2004-06-22 22:43 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-23 00:17 ` L J Bayuk <ljb220@mindspring.com>
2004-06-23 06:15 ` G. van Wieringen <wieri420@planet.nl>
2004-06-23 06:23 ` G. van Wieringen <wieri420@planet.nl>

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