#1 2012-12-11 09:17:14

moggco
Member
Registered: 2010-09-27
Posts: 9

TODBCLib report "Unspecified error" when record is empty

I use the odbc classes to operate Postgresql database, my code as follow:

      Prop := TODBCConnectionProperties.Create('pgds','traffic','user','pass');
      Connection := TODBCConnection.Create(Prop);
      Connection.Connect;
      Connection.StartTransaction;
      Tbl := TODBCStatement.Create(Connection);
      Tbl.Execute(RawUTF8('delete from nodes'), false);
      TiberoConnection.Commit;

if record is empty, it raise "Unspecified error", the value of Status is 100 that meaning no data processed.

The raise error puzzling me for hours, I finally found the answer after check my codes and odbc configure again and again.

Offline

#2 2012-12-11 11:20:45

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: TODBCLib report "Unspecified error" when record is empty

I've fixed unexpected exception raised if SQL_NO_DATA is returned.
See http://synopse.info/fossil/info/bdf361b8e8

We should add Postgresql support at the ORM level, I think.
If you can help, you are welcome!

Offline

#3 2012-12-12 01:59:34

moggco
Member
Registered: 2010-09-27
Posts: 9

Re: TODBCLib report "Unspecified error" when record is empty

OK.

Its my pleasure if can help synopse.

I just tested CRUD on postgresql, all is work.

Offline

Board footer

Powered by FluxBB