DBX Error: Error Code: 65535

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for PostgreSQL in Delphi and C++Builder
Post Reply
igorb
Posts: 1
Joined: Wed 04 Sep 2013 06:59

DBX Error: Error Code: 65535

Post by igorb » Wed 04 Sep 2013 07:14

Hello,

we are experiencing some problems with our application while connected to PostregSQL using
dbexppgsql40.dll (version 3.2.3).
We are randomly getting the error: DBX Error: Error Code: 65535.
The connection parameters are set like this:

Code: Select all

    
Conn.DriverName := 'DevartPostgreSQL';
Conn.GetDriverFunc := 'getSQLDriverPostgreSQL';
Conn.LibraryName := 'dbexppgsql.dll';
Conn.LoginPrompt := False;
Conn.VendorLib := 'not used';

Conn.Params.Clear;
Conn.Params.Add('DriverName=DevartPostgreSQL');
Conn.Params.Add('HostName=' + hostName);
Conn.Params.Add('DataBase=' + dbName);
Conn.Params.Add('User_name=' + userName);
Conn.Params.Add('Password=' + password);
Conn.Params.Add('Server Port=' + port);
Conn.Params.Add('BlobSize=-1');
Conn.Params.Add('FetchAll=True');
Conn.Params.Add('LongStrings=True');
Conn.Params.Add('DetectParamTypes=True');
Conn.Params.Add('Charset=UTF8');
Conn.Open;
I saw in another post with the same error you are suggesting to set the direct mode for MySQL driver. Has PostgreSQL driver something similar we can try?

Thanks,
Igor

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: DBX Error: Error Code: 65535

Post by DemetrionQ » Wed 04 Sep 2013 10:31

Hello.

1) Devart dbExpress driver for PostgreSQL works only in the Direct mode.

2) You specified in your message, that you are using dbexppgsql40.dll, but in the code there is dbexppgsql.dll. Please clarify the library you are using. The library name depends on the used IDE:
  • dbexppgsql40.dll - CodeGear RAD Studio 2007 and higher
    dbexppgsql30.dll - Delphi 2006 and Turbo products
    dbexppgsql.dll - other IDE versions
If you specify a correct library name, but the problem still repeats, please let us know the following:
- the exact server version;
- the exact IDE version (you can learn it from the Help -> About... IDE menu).

mdehaij
Posts: 8
Joined: Mon 13 Jan 2014 13:08

Re: DBX Error: Error Code: 65535

Post by mdehaij » Wed 15 Jan 2014 14:54

We also get this error (as soon as the application tries to connect to the database), but only on PostgreSQL 8.0 databases (PostgreSQL 8.3 and 9.2 database connections work fine).

dbexppgsql40.dll version 3.0.1.0
Delphi 2007 IDE version: 11.0.0292.10471
PostgreSQL 8.0.2 on i686-pc-mingw32, compiled by GCC (gcc.exe (GCC) 3.4.2 (mingw-special)

Connection parameters:
ConnectionName := 'Devart PostgreSQL';
DriverName := 'DevartPostgreSQL';
GetDriverFunc := 'getSQLDriverPostgreSQL';
LibraryName := 'dbexppgsql40.dll';
VendorLib := 'not used';

Params.Values['UseUnicode'] := 'False';
Params.Values['SSLMode'] := 'PREFER';
Params.Values['Port'] := '5432';

Could you please help? Even though it's old some of our customers still have an in-house PostgreSQL 8.0 database and they might not want to update it.

Regards,
Martin

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DBX Error: Error Code: 65535

Post by AlexP » Wed 15 Jan 2014 16:03

Hello,

We couldn't reproduce the problem on the latest dbExpress driver for PostgreSQL version 3.3.4. Try to reproduce the problem on this version and let us know the result.

mdehaij
Posts: 8
Joined: Mon 13 Jan 2014 13:08

Re: DBX Error: Error Code: 65535

Post by mdehaij » Mon 20 Jan 2014 11:39

Hello,

We also get the error with the latest (3.4.4) dbexpress driver.

This is our create table script (column names shouldn't matter so I left them in Dutch):

create table mytable (
dnkey serial,
dvnaam varchar(200),
dvtussenvoegsel varchar(10),
dvvoorletters varchar(10),
....
;

alter table mytable
add constraint cpk_mytable
primary key (dnkey)
;

log file created with with options
log_statement and log_connection set to true.

server is 8.0 running on Windows 2000

2014-01-20 12:05:48 LOG: database system is ready
2014-01-20 12:07:02 LOG: connection received: host=192.168.xx.yy port=8686
2014-01-20 12:07:02 LOG: connection authorized: user=myuser database=mydb
2014-01-20 12:07:02 LOG: statement: SELECT VERSION()
2014-01-20 12:07:02 LOG: statement: show integer_datetimes
2014-01-20 12:07:02 LOG: statement: SET search_path TO public
2014-01-20 12:07:02 LOG: statement: SELECT dnkey, dvnaam, dvtussenvoegsel, dvoorletters FROM mytable

[after our query the dbexpress driver sends the following query...]

2014-01-20 12:07:02 LOG: statement: SELECT current_database() AS TABLE_CATALOG, n.nspname AS TABLE_SCHEMA, t.relname AS TABLE_NAME, t.oid AS TABLE_OID, current_database() AS INDEX_CATALOG, n.nspname AS INDEX_SCHEMA, c.relname AS INDEX_NAME, c.oid AS INDEX_OID, a.attname AS COLUMN_NAME, a.attnum AS COLUMN_POSITION, 0 AS DESCENDING , CASE WHEN i.indisunique=TRUE THEN 1 ELSE 0 END AS UNIQUE FROM pg_index i INNER JOIN pg_class c ON c.oid = i.indexrelid INNER JOIN pg_class t ON t.oid = i.indrelid INNER JOIN pg_namespace n ON n.oid = t.relnamespace INNER JOIN pg_attribute a ON a.attrelid = i.indrelid AND a.attnum = any (i.indkey) WHERE n.nspname LIKE 'public' AND t.relname LIKE 'mytable' ORDER BY indisprimary::integer DESC, n.nspname, t.relname, c.relname, a.attnum

2014-01-20 12:07:02 ERROR: op ANY/ALL (array) requires array on right side

[after this I got an OleException(!) "DBX Error: Error code 65535", and so many errors in our application that I had to kill it, so I guess the next log messages can be ignored]

2014-01-20 12:07:06 LOG: unexpected EOF on client connection
2014-01-20 12:07:06 LOG: disconnection: session time: 0:00:03.96 user=myuser database=mydb host=192.168.xx.yy port=8686

I hope you could investigate for the latest driver, please let me know if you need more info :)

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DBX Error: Error Code: 65535

Post by AlexP » Tue 21 Jan 2014 08:05

Hello,

Thank you for the information, we have reproduced the problem and will try to fix it in the nearest future.

mdehaij
Posts: 8
Joined: Mon 13 Jan 2014 13:08

Re: DBX Error: Error Code: 65535

Post by mdehaij » Tue 21 Jan 2014 09:39

Thank you very much! Unfortunately a lot of our customers are still on PostgreSQL 8.0 so this will be a big help!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: DBX Error: Error Code: 65535

Post by AlexP » Fri 24 Jan 2014 09:16

Hello,

We will fix this behavior till the release of the next dbExpress driver build

Post Reply