Search found 164 matches

by Wild_Pointer
06.09.2019, 07:41
Forum: ZeosLib 7.2 Forum
Topic: TZConnection - thread safe?
Replies: 11
Views: 1871

Re: TZConnection - thread safe?

Hello, marsupilami. The driver manager should be protected, but the only protection I found (v7.2.4) is in ZdbcPooled.pas line 348: // I had a strong feeling that DriverManager is not thread-safe, because i // had random access violations on high load operations at this point. // For now, i will ser...
by Wild_Pointer
05.09.2019, 16:28
Forum: ZeosLib 7.2 Forum
Topic: TZConnection - thread safe?
Replies: 11
Views: 1871

Re: TZConnection - thread safe?

Dear community, I was having access violations on TZConnection.Connect: :0044e0a6 TStringList.InsertItem + $56 :0044dc2d TStringList.AddObject + $59 ZURL.TZURLStringList.SetTextStr('application_name=nFormer'#$D#$A) ZDbcIntfs.TZDriverManager.ConstructURL('postgresql-9','localhost','npoint','postgres'...
by Wild_Pointer
08.12.2017, 14:19
Forum: ZeosLib 7.2 Forum
Topic: TZPgEventAlerter and connection problems
Replies: 10
Views: 1416

Re: TZPgEventAlerter and connection problems

Hmmm honestly I don't care if components change behaviour for Zeos 7.3. For Zeos 7.2 it is a different story. Your proposed code just swallows all exceptions that happen - at least all EZSQLExceptions. So if I don't install an error handler everything will look as if it works although it doesn't. M...
by Wild_Pointer
06.12.2017, 22:30
Forum: ZeosLib 7.2 Forum
Topic: TZPgEventAlerter and connection problems
Replies: 10
Views: 1416

Re: TZPgEventAlerter and connection problems

Fr0sT, marsupilami, miab3 Thank You for your quick and valuable feedback. There's a;ready ZIBEventAlerter unit with error handling so the change should be done accordingly. Some code style suggestions: - const ErrorMessage in TZPgErrorEvent. In 7.3 all ref-counted types in parameters made const or v...
by Wild_Pointer
05.12.2017, 23:02
Forum: ZeosLib 7.2 Forum
Topic: TZPgEventAlerter and connection problems
Replies: 10
Views: 1416

TZPgEventAlerter and connection problems

I've noticed, that TZPgEventAlerter does not detect seerver disconnects. This seems like a big issue as you can't trust the OnNotify event to be fired. The only way would be to periodically execute SQL statements to see if connection still active. The cause was there was no handling of error returne...
by Wild_Pointer
03.12.2013, 10:28
Forum: ZeosLib 7.1 stable Forum
Topic: protocol differencies
Replies: 3
Views: 731

Re: protocol differencies

Hello, The Name? Actually there are NO behavior changes. Just a hint "we support PG9+". Are you sure? For some unknown reason we get range check errors on some computers when using postgresql-8 and they are gone if we use postgres-9... I was unable to reproduce it on my computer, but the p...
by Wild_Pointer
20.11.2013, 10:03
Forum: 6.6 - stable
Topic: windows 7 - SQLHourGlass - SLOW
Replies: 12
Views: 5771

Re: windows 7 - SQLHourGlass - SLOW

Hello marsupilami,

Thank You for the explanation.

Best regards,
Wild Pointer
by Wild_Pointer
19.11.2013, 11:01
Forum: 6.6 - stable
Topic: windows 7 - SQLHourGlass - SLOW
Replies: 12
Views: 5771

Re: windows 7 - SQLHourGlass - SLOW

Hello, marsupilami I thought about that too, like replacing all ZQuery.Open with OpenDataSet(ZQuery) where procedure OpenDataSet(ADataSet: TZQuery) begin ADataSet.Connection.ShowSQLHourGlass; try ADataSet.Open; finally ADataSet.Connection.HideSQLHourGlass; end; end; After thinking about that a bit l...
by Wild_Pointer
18.11.2013, 09:48
Forum: 6.6 - stable
Topic: windows 7 - SQLHourGlass - SLOW
Replies: 12
Views: 5771

Re: windows 7 - SQLHourGlass - SLOW

Hello mdaems, it took me some time :). As usual, when a temporary solution is made, the proper fix is postponed. Anyway after switching to Zeos 7.0.6 we faced the same decrease in performance so here I am sending a patch. It speeds things up for me. I've used git on 7.0.6 version of ZeosLib. If I sh...
by Wild_Pointer
24.08.2013, 22:04
Forum: SQLite
Topic: detail Sqlite error messages
Replies: 1
Views: 1882

detail Sqlite error messages

hello, I've noticed that error messages for SQLite are useless. What can you say when you get error "SQL logic error or missing database" when you have the name of table misspelled in the SQL statement you want to execute? So I made error messages more detail using sqlite_errstr function. ...
by Wild_Pointer
15.08.2013, 11:18
Forum: 6.6 - stable
Topic: Syntax error - Multiple commands
Replies: 2
Views: 1903

Hello,

the other solution is to change the SQL to:

Code: Select all

UPDATE SCE2_ESTQUIMI SET quant_nf = quant_nf + 1 WHERE codigo IN (200, 201, 202)
That should increase the speed of your application.

Good luck!
by Wild_Pointer
25.01.2013, 11:32
Forum: PostgreSQL
Topic: Comments of DB Objects in Zeos
Replies: 4
Views: 2174

EgonHugeist , ProstgreSQL doesn't convert the characters to your current client encoding? Well, it tries but because the byte-sequences are incompatible it gives an exception "SQL Error: ERROR: character with byte sequence 0xc5 0xa1 in encoding "UTF8" has no equivalent in encoding &q...
by Wild_Pointer
24.01.2013, 11:02
Forum: PostgreSQL
Topic: Comments of DB Objects in Zeos
Replies: 4
Views: 2174

Comments of DB Objects in Zeos

Hello, in ZDbcPostgreSqlMetadata.pas I see the table of DB comments (pg_description) is used when getting column information : function TZPostgreSQLDatabaseMetadata.UncachedGetColumns(const Catalog: string; const SchemaPattern: string; const TableNamePattern: string; const ColumnNamePattern: string)...
by Wild_Pointer
31.10.2012, 14:41
Forum: ZeosLib 7.0 Beta Forum
Topic: Zeos does not recognize the command case of PostgreSQL.
Replies: 3
Views: 1801

Not strange at all :) This is how Data Aware component TDbGrid works. It does not show the value for the memo fields. Someone should correct me if I'm mistaken but it is the libpq that tells the Zeos lib that the column is memo. You could try selecting value from the column that is varchar(N) where ...
by Wild_Pointer
31.10.2012, 09:46
Forum: ZeosLib 7.0 Beta Forum
Topic: Zeos does not recognize the command case of PostgreSQL.
Replies: 3
Views: 1801

Hello elidorio2 , the problem is the Postgresql server presumes the result of case command is text. Text type fields are used as memo fields in Zeos. Try casting the result of case command to character varying (20) and you'll get what you want. example SELECT ..., CAST( case when .... then .... end ...