Search found 211 matches

by MJFShark
15.05.2021, 20:52
Forum: ZeosLib 7.3/8.0 Forum
Topic: ZFormatSettings issues related to separators
Replies: 1
Views: 97

ZFormatSettings issues related to separators

The ZFormatSettings unit and how it works is very nice. There is an issue, however, because while you can set various formats, you can't set the date or time separators, and so if they get changed from the regional defaults the library routines used for conversions won't work. For example if my regi...
by MJFShark
08.05.2021, 17:19
Forum: ZeosLib 7.3/8.0 Forum
Topic: Reconnect or test connection question
Replies: 2
Views: 239

Re: Reconnect or test connection question

Awesome, thanks for the tips!

-Mark
by MJFShark
08.05.2021, 14:14
Forum: ZeosLib 7.3/8.0 Forum
Topic: Reconnect or test connection question
Replies: 2
Views: 239

Reconnect or test connection question

Hi All! I have a situation where I'm getting a disconnected connection despite doing some attempted keep-alive pinging to the server (in this case with the OLEDB protocol to SQLServer.) What's the recommended way to handle this kind of thing as far as figuring out that it's disconnected and then rec...
by MJFShark
08.05.2021, 12:56
Forum: ZeosLib 7.3/8.0 Forum
Topic: Possible minor timestamp format issue in TZParam
Replies: 0
Views: 373

Possible minor timestamp format issue in TZParam

In looking at the FormatSettings stuff I noticed that procedure TZParam.SetAsZTimestamps uses LongTimeFormat as the format used to do the conversion to string. I *think* that that should be LongDateFormat instead. I'm not sure if this is a bug or not, it's just something I noticed looking through th...
by MJFShark
07.05.2021, 11:57
Forum: ZeosLib 7.3/8.0 Forum
Topic: Converting ZDatasetParam unit to use ZFormatSettings
Replies: 6
Views: 358

Re: Converting ZDatasetParam unit to use ZFormatSettings

Hi Michael, Thanks! I see that you've just committed a change to have ZParams use ZFormatSettings if available. Nice! My other comments are just related to Delphi's handling of the 'm' format character. If it appears directly (disregarding separators) after an 'h' character it should be treated as a...
by MJFShark
02.05.2021, 17:35
Forum: ZeosLib 7.3/8.0 Forum
Topic: Connection Pooling Bug
Replies: 13
Views: 554

Re: Connection Pooling Bug

I'm not sure this is useful or not, but what I do to fake a ping to the server is to request a tablelist with a filter that won't exist. I'm not sure it's the way to go, but it's been working pretty well in all my test cases. -Mark if NativePingSupported then begin Result := ZConn.PingServer; end el...
by MJFShark
02.05.2021, 12:39
Forum: ZeosLib 7.3/8.0 Forum
Topic: Converting ZDatasetParam unit to use ZFormatSettings
Replies: 6
Views: 358

Re: Converting ZDatasetParam unit to use ZFormatSettings

Here's a modification to TryUniToTimeStamp to attempt to handle the 'm' is for minute if it follows 'h' issue. I put a define in just to make it easier to do a/b type testing. I wasn't sure about all the delimiter chars I used to cancel the MIsMinute boolean, so they could probably be adjusted. I'd ...
by MJFShark
02.05.2021, 11:44
Forum: ZeosLib 7.3/8.0 Forum
Topic: Converting ZDatasetParam unit to use ZFormatSettings
Replies: 6
Views: 358

Re: Converting ZDatasetParam unit to use ZFormatSettings

Thanks Jan! The non-tzfield format handling (ZSysUtils) is used for parameter .value string->date/time/timestamp conversions and that's where I hit some issues. It looks like 'm' or 'mm' for minutes (instead of n) is only handled by the time conversions and not the timestamp conversions. Since the d...
by MJFShark
01.05.2021, 19:58
Forum: ZeosLib 7.3/8.0 Forum
Topic: Converting ZDatasetParam unit to use ZFormatSettings
Replies: 6
Views: 358

Re: Converting ZDatasetParam unit to use ZFormatSettings

After some more research I realized that I had a fundamental misunderstand of how Zeos handles datetime format settings. I was thinking that the ConSettings's ReadFormatSettings and WriteFormatSettings are set from the ZFormatSettings, but they are not. They're either set by ConnProps_DateReadFormat...
by MJFShark
01.05.2021, 16:24
Forum: ZeosLib 7.3/8.0 Forum
Topic: Converting ZDatasetParam unit to use ZFormatSettings
Replies: 6
Views: 358

Converting ZDatasetParam unit to use ZFormatSettings

Currently the ZDatasetParams unit uses the older {$IFDEF WITH_FORMATSETTINGS}FormatSettings{$ELSE}SysUtils{$ENDIF}.ShortDateFormat type date/time formattings. I'd like to convert it to use the FConSettings^.ReadFormatSettings.DateFormat type calls instead. However there are a couple of snags: 1. FCo...
by MJFShark
30.04.2021, 12:47
Forum: ZeosLib 7.3/8.0 Forum
Topic: ZParam: Set value without changing datatype.
Replies: 7
Views: 444

Re: ZParam: Set value without changing datatype.

[update - moved the ReadFormatSettings stuff to a new post] The new change is good! I just modified the date/time/timestamp conversions to use the nice new ReadFormatSettings. I'm using FConnSettings, but I'm not sure if it should be using a different level. This code was copied from ZDbcCache.pas a...
by MJFShark
29.04.2021, 22:04
Forum: ZeosLib 7.3/8.0 Forum
Topic: ZParam: Set value without changing datatype.
Replies: 7
Views: 444

Re: ZParam: Set value without changing datatype.

I did see that one and changed it (yesterday I think.) Does setting the value and then the datatype actually do a conversion? I don't see that in my tests. I see that InternalSetAsXXXX looks like it's capable of doing conversions, but CheckDataIndex sets FSQLDataType to the variant type and then no ...
by MJFShark
29.04.2021, 14:25
Forum: ZeosLib 7.3/8.0 Forum
Topic: ZParam: Set value without changing datatype.
Replies: 7
Views: 444

ZParam: Set value without changing datatype.

Hey all! How do you set the value of a ZParam without changing its datatype? Basically I'm wondering if I set the datatype of a ZParam to a date, then how can I set its value using a string while keeping it a datetype? I thought that I could do something like: MyParam.SQLType := stDate; MyParam.Valu...
by MJFShark
09.04.2021, 17:32
Forum: Oracle
Topic: My LOBs aren't getting released...?
Replies: 25
Views: 1362

Re: My LOBs aren't getting released...?

That's great new! Mystery solved and I'll chill with a brewsky later! I must have misunderstood some of this thread lol. I agree on what you say about the lobs IF the dataset is a one way, firehose type cursor. I'm not sure that's possible in the current architecture (maybe using dbc directly instea...
by MJFShark
09.04.2021, 14:57
Forum: Oracle
Topic: My LOBs aren't getting released...?
Replies: 25
Views: 1362

Re: My LOBs aren't getting released...?

Those settings are the same as mine (although for my test I'm not threading.) I don't *think* any of my changes made any functional change in the way things work. I did a "one to one" conversion from the old CachedLobs setting to the new LobCacheMode setting. I've gone back to older commit...