delphi-10.2-tokyo

FireDAC mapping rules do not apply to parameters?

左心房为你撑大大i 提交于 2019-12-04 05:32:04
问题 I have a TFDConnection to a FireBird database for which I apply Data type mapping for backward compatibility with a previous data access technology (SQLDirect): with FormatOptions.MapRules.Add do // TIMESTAMP will be ftDateTime instead of ftTimeStamp begin SourceDataType := dtDateTimeStamp; TargetDataType := dtDateTime; end; with FormatOptions.MapRules.Add do // FLOAT will be ftFloat instead of ftSingle begin SourceDataType := dtSingle; TargetDataType := dtDouble; end; FormatOptions

How to compare sets of enumerated types

血红的双手。 提交于 2019-12-04 03:36:55
From a certain point I got tired of writing set conditions ( and , or ), because for more conditions or longer variable names it begins to be clumsy and annoying to write all over again. So I started writing helpers so I could write ASet.ContainsOne([ceValue1, ceValue2]) instead of (ceValue1 in ASet) or (ceValue2 in ASet) . type TCustomEnum = (ceValue1, ceValue2, ceValue3); TCustomSet = set of TCustomEnum; TCustomSetHelper = record helper for TCustomSet function ContainsOne(ASet: TCustomSet): Boolean; function ContainsAll(ASet: TCustomSet): Boolean; end; implementation function

Why the exception is not caught by the try… except end;?

隐身守侯 提交于 2019-12-03 23:28:33
I have this code (that runs under iOS with Delphi Tokyo): procedure TMainForm.Button1Click(Sender: TObject); var aData: NSData; begin try try aData := nil; finally // this line triggers an exception aData.release; end; except on E: Exception do begin exit; end; end; end; Normally the exception should be caught in the except end block, but in this case it is not caught by the handler and it is propagated to the Application.OnException handler. Access violation at address 0000000100EE9A8C, accessing address 0000000000000000 Did I miss something? This is a bug (actually, a feature ) on iOS and

What has happened to ComboBox.Sorted := True; in Delphi 10.2?

丶灬走出姿态 提交于 2019-12-02 10:14:30
Having recently received a 'Tumbleweed' badge for my last question, I am not sure whether I should be asking any more questions, but here goes. I am populating a TComboBox with items from a sqlite table and this works fine. In my previous version of Delphi I was able to use ComboBox1.Sorted := True; to sort the items, but this seems to have disappeared in Delphi 10.2. I can sort the items in the table by applying a query and then populate the TComboBox from the sorted table. However, for curiosities sake I would like to find out how one now sorts items in a TComboBox . I have found some

FireDAC mapping rules do not apply to parameters?

喜欢而已 提交于 2019-12-02 07:25:10
I have a TFDConnection to a FireBird database for which I apply Data type mapping for backward compatibility with a previous data access technology (SQLDirect): with FormatOptions.MapRules.Add do // TIMESTAMP will be ftDateTime instead of ftTimeStamp begin SourceDataType := dtDateTimeStamp; TargetDataType := dtDateTime; end; with FormatOptions.MapRules.Add do // FLOAT will be ftFloat instead of ftSingle begin SourceDataType := dtSingle; TargetDataType := dtDouble; end; FormatOptions.OwnMapRules := true; At runtime I create a TFDQuery that I link to that TFDConnection. I can see that it

Delphi 10.2 fire dac

末鹿安然 提交于 2019-12-01 13:32:17
问题 I'm using delphi 10.2 and I'm trying to create my first application using multi device forms which is connected to MS SQL Server, but it shows this error... [DCC Fatal Error] ReadCounterForm.pas(14): F2613 Unit 'FireDAC.Phys.MSSQL' not found. 来源: https://stackoverflow.com/questions/52466705/delphi-10-2-fire-dac

How to hide multiple tabs in TTabcontrol

强颜欢笑 提交于 2019-12-01 13:23:18
问题 My program has three drop-down and one ttabcontrol which has 5 Tabs. what i need to know is how can i hide all the tabs and set their visiblety back again if drop-down menu has a particular item selected. For example My drop-down has index item of. A , B , C , A+B , A+C TabControl had following tabs. A B C Now i need to hide all the tabs and unhide tab A if drop down has selected a or a & b if dropdown is Selected to A+ B. 回答1: use enumerable type to do that. You can explore boolean operation

Is there a limit to the Delphi Win64 debugger loading symbols?

て烟熏妆下的殇ゞ 提交于 2019-12-01 10:46:29
I'm using RAD Studio 10.2.3 Tokyo. Research Related to this question , and this issue I run into trouble when debugging my flagship application that extensively utilizes runtime BPLs as a plugin system. The problem occurs only when compiled and debugged as a Win64 application, and using Delphi's Win64 internal debugger. Delphi's Win32 internal debugger does not have this problem. When using "load all symbols" in the debugger options, I miss stack and local symbols info for some units but not other units in the same BPL (check screenshots). However, when I use the option to load debug info for

Is there a limit to the Delphi Win64 debugger loading symbols?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 08:52:01
问题 I'm using RAD Studio 10.2.3 Tokyo. Research Related to this question, and this issue I run into trouble when debugging my flagship application that extensively utilizes runtime BPLs as a plugin system. The problem occurs only when compiled and debugged as a Win64 application, and using Delphi's Win64 internal debugger. Delphi's Win32 internal debugger does not have this problem. When using "load all symbols" in the debugger options, I miss stack and local symbols info for some units but not

TFDQuery.Prepare cannot determine parameter types for INSERT query on MS SQL SERVER

不打扰是莪最后的温柔 提交于 2019-11-29 12:29:07
I open a TFDConnection for MS SQL Server with parameters: DriverID=MSSQL Password=test User_Name=test Server=VS2003-2008 Database=test Single Connection=TRUE Max Cursors=256 USE OLEDB=TRUE I then create a TFDQuery (run time), set its connection to the above, fill it with an parameterized INSERT query: insert into TT_ACT (TT_ACT_ID,TT_PARENT_ID,TT_FROMDATE,TT_TODATE,TT_NAME,TT_NR,TT_CODE,TT_GROUP...) values (:TT_ACT_ID,:TT_PARENT_ID,:TT_FROMDATE,:TT_TODATE,:TT_NAME,:TT_NR,:TT_CODE,:TT_GROUP,...) I then call Prepare for the query and get: [FireDAC][Phys][MSSQL]-335 Parameter [TT_ACT_ID] data