Search found 753 matches

by aehimself
06.11.2019, 09:06
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2725

Re: ZConnection - force a complete reload of database libraries

I had some thought about calling TerminateThread in a middle of a Try ... Finally ... End block a couple of day ago and it did start to bother me. I'll start to look into the sources @Fr0st pointed me to and will try to somehow achieve what I'd like to do. @Jan, Your approach is very interesting, I'...
by aehimself
05.11.2019, 13:53
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2725

Re: ZConnection - force a complete reload of database libraries

connect-stage could be controlled with timeouts or even mysql_real_connect_nonblocking() The trick here is that I can pass any method pointer, let it be ZConnection.Connect, TZMetaData.Open or TZQuery.ExecSQL. The solution must include but not exclusive to .Connect and should work on all protocols....
by aehimself
05.11.2019, 09:31
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2725

Re: ZConnection - force a complete reload of database libraries

When you call WinAPI TerminateThread, you just halt the Execute method but nothing prevents thread destructor or any other method from running. So just dispose all objects you created there. Unfortunately it's not that easy :) The worker thread allocates nothing, it just receives a method pointer t...
by aehimself
30.10.2019, 21:28
Forum: ZeosLib 7.2 Forum
Topic: ZConnection - force a complete reload of database libraries
Replies: 54
Views: 2725

ZConnection - force a complete reload of database libraries

Continuing the slightly offtopic http://zeoslib.sourceforge.net/viewtopic.php?f=40&t=97224 I managed to force longer SQL operations in a worker thread and added a cancel option to call TerminateThread on it. Seems to be working so far. My only concern is that - as expected - this leaves lots of ...
by aehimself
29.10.2019, 08:39
Forum: ZeosLib 7.2 Forum
Topic: Zeos 7.2.6 + Oracle - set schema on TZConnection?
Replies: 16
Views: 755

Re: Zeos 7.2.6 + Oracle - set schema on TZConnection?

marsupilami wrote:the problem for me is that different vendors seem to have different opionions on what a schema and what a catalog is
This is exactly what I started to wonder about - and the deeper you dig, the worse it gets :)
by aehimself
28.10.2019, 23:11
Forum: ZeosLib 7.2 Forum
Topic: Zeos 7.2.6 + Oracle - set schema on TZConnection?
Replies: 16
Views: 755

Re: Zeos 7.2.6 + Oracle - set schema on TZConnection?

And you were right, as ever :) Setting the "Catalog" property to the schema name forced the queries using that connection to the right table.

The thing which confused me was that it's called Schema in the Metadata and was not brave enough to experiment.

@ Jan, I really owe you a beer now.
by aehimself
28.10.2019, 13:59
Forum: ZeosLib 7.2 Forum
Topic: Zeos 7.2.6 + Oracle - set schema on TZConnection?
Replies: 16
Views: 755

Zeos 7.2.6 + Oracle - set schema on TZConnection?

Hello, I have an application connecting to an Oracle database with multiple schemas, containing the same table names. I dynamically create a TZQuery and try to execute a simple command: INSERT INTO TABLE (COLUMN) VALUES ('ColumnValue') This fails with an error message (cancelled by the user I think....
by aehimself
28.10.2019, 00:26
Forum: ZeosLib 7.3/8.0 Forum
Topic: Are commits from 7.2.6 in the 7.3 branch?
Replies: 2
Views: 623

Re: Are commits from 7.2.6 in the 7.3 branch?

marsupilami wrote:Zeos 7.3 currently is the main developmet branch. All fixes go there first and are tested there first.
That's what I'd do, that's what I thought. I just felt it better to ask :)

Cheers!
by aehimself
26.10.2019, 19:11
Forum: ZeosLib 7.3/8.0 Forum
Topic: Are commits from 7.2.6 in the 7.3 branch?
Replies: 2
Views: 623

Are commits from 7.2.6 in the 7.3 branch?

I saw that 7.2.6 was released and there are fixes / features which I'd like to have. Unfortunately though I have to stay on 7.3 because of the oracle codepage buffer size thingie :) So the question is... If I pull a fresh copy of 7.3, will the 7.2.6 commits be included? Are there a (simple) way to c...
by aehimself
24.10.2019, 10:36
Forum: ZeosLib 7.2 Forum
Topic: Load BLOB fields on-demand?
Replies: 9
Views: 487

Re: Load BLOB fields on-demand?

That seems strange to me. I see no reason for the program to freeze, if usage of the connection and of the query object are transferred back to the main thread. It's kind of logical. Application code looks like this: TSQLInThread.Open(query); maxrecords := query.RecordCount; RecordCount sends us to...
by aehimself
22.10.2019, 19:02
Forum: ZeosLib 7.2 Forum
Topic: Load BLOB fields on-demand?
Replies: 9
Views: 487

Re: Load BLOB fields on-demand?

P.s.: I forgot to add the .FetchAll to the .Open class procedure, which is a big-big mistake! While opening the dataset works fine, upon accessing any properties (like .RecordCount) starts the fetch in the main thread, causing the main application to freeze again. Feel free to add it yourself, or do...
by aehimself
22.10.2019, 07:59
Forum: ZeosLib 7.2 Forum
Topic: Load BLOB fields on-demand?
Replies: 9
Views: 487

Re: Load BLOB fields on-demand?

So the most easy thing you could do is to employ a scheme like this: Have TZConnection and TZQuery in the main thread. Prepare everything. Disconnect all other components, like TDataSource etc. from TZQuery. Have a separate thread open the query and maybe make sure, it fetches all data (TZQuery.Fet...
by aehimself
04.10.2019, 21:33
Forum: MySQL
Topic: Simple Insert
Replies: 3
Views: 1394

Re: Simple Insert

[...] In Your case I strongly recommend the use of parameters: [...] This way you don't need to think about quotes and it also helps protecting from SQL injection. Not just in this case, in all cases. SQL injection is deadly, using parameters will prevent that and make your queries look a LOT more ...
by aehimself
04.10.2019, 20:53
Forum: ZeosLib 7.2 Forum
Topic: Oracle 12.2.0.1 keeps throwing ORA-01406
Replies: 25
Views: 4773

Re: Oracle 12.2.0.1 keeps throwing ORA-01406

...aaaaaand you see, this is why I always recommend this package when it comes to database connections (we just changed an old, internal app's ADO to Zeos). Yes, indeed it seems that the problem is completely solved. r5973, AL32UTF8: [2019.10.04 21:09:06.733] Tab 0, TESTCONNECTION: Successfully conn...
by aehimself
29.09.2019, 11:47
Forum: ZeosLib 7.2 Forum
Topic: Oracle 12.2.0.1 keeps throwing ORA-01406
Replies: 25
Views: 4773

Re: Oracle 12.2.0.1 keeps throwing ORA-01406

So I did an extract with PL/SQL to create the table / upload some sample data. When trimming the excess from the export file I realized that PL/SQL simply, silently trims ALL the special characters from the strings. Doublechecked it with a SELECT query, with the same result. No wonder it works. I'll...