Perhaps you can use a DSN connection and in the PostgreSQL ODBC Driver setup for the connection turn on
Or you can use the ODBC Administrator, under the tracing tab, Start Tracing.
Or in the server postgresql.conf temporarily turn the logging on for all statements, to capture lower
level ODBC communication.
Do the ODBC connection encoding, and the database encoding match?
A.j. Langereis wrote:
> Dear all,
> I have written an application that uses Postgresql (8.1.0) trough an ODBC (ANSI) connection. I noticed that a query like "select 'bar' as foo" does not give the value "bar" in the column "foo". This works normally under PGadmin and even on other databases via ODBC. Am I overlooking something or might this be a bug?
> Values that I do get are like "#0#0#0#0#0"
> A piece of Delphi code to show the problem:
> procedure show_problem(conn : TADOConnection)
> qry : TAdoQuery;
> datasource: TDataSource;
> qry := TADOQuery.create(nil);
> qry.SQL.Text:= 'select ''bar'' as foo';
> if not qry.eof then
> datasource := TDataSource.Create(nil);
> datasource.dataset := qry;
> //datasource.DataSet.Fields.AsString now has the value of '#0#0#0#0#0'
> //datasource.DataSet.Fields.FieldName is now equal to 'foo'
> The version of ODBC that I've got installed is 08.00.0102 (via MSI installed).
In response to
pgsql-odbc by date
|Next:||From: Ludek Finstrle||Date: 2005-12-24 09:35:43|
|Subject: patch for [ psqlodbc-Bugs-1000498 ] rollback to savepoint in case of error|
|Previous:||From: Campbell, Greg||Date: 2005-12-24 00:22:28|
|Subject: Re: ODBC connection string, MS Access|