c0d3r
Members-
Content Count
129 -
Joined
-
Last visited
-
Days Won
1
Everything posted by c0d3r
-
[MSBuild Warning] There is a circular reference involving the import of file ...codgear.delphi.targets...
c0d3r replied to c0d3r's topic in Delphi IDE and APIs
Good catch!. Removing the one without condition seems made it working. Thanks. -
Hi, All I got very confused for the following code which is working in our 32 bit application but not in 64 bit application (using Delphi 10.4.1): function TMyService.Init(const ClientIdent: TkbmMWClientIdentity; const Args: array of Variant): Variant; var ds: TDataset begin Result := ''; <---- raising "Invalid variant type" in 64 bit application ... end; Any idea? Thanks.
-
Yes. That was it. Thanks much!
-
These 2 lines codes aren't related to kbmMW, they are delphi RTTL related codes, that you can call all the published methods in a class. @ServiceMethod := MethodAddress(Func) ServiceMethod(Self, ClientIdent, Args)
-
I'm looking into: @ServiceMethod := MethodAddress(Func) and ServiceMethod(Self, ClientIdent, Args) wondering if it works for 64 bit or not. when I trace to the actual method code, all the properties in that "Self" is all reset, which tells me the 'Self' isn't the one. Edit: WOW, something is wrong for sure, in that TMyService.Init method, calling a class function got 'c0000005 ACCESS_VIOLIATION' error: class function TMyService.GetPrefServceName: string begin Result := 'ABC'; end; function TMyService.Init(const ClientIdent: TkbmMWClientIdentity; const Args: array of Variant): Variant; var ds: TDataset S: string; begin s := GetPrefServiceName; <---- raising "c0000005 ACCESS_VIOLATION" in 64 bit application ... end;
-
Odd, the initial Result.VType = 48088, variant array of unknown, What was that?!
-
Just want to make it clear. This is a Windows service project, includes several Micro services that serve client requests. Here are what we have in codes: Type TServerServiceMethod = function(Sender: TObject; const ClientIdent: TkbmMWClientIdentity; const Args:array of Variant): variant; Function to process client request, the result will be send back to client: function TMybaseService.ProcessRequest(const Func: string; const ClientIdent: TkbmMWClientIdentity; const Args: array of Variant): Variant; var ServiceMethod: TServerServiceMethod; begin @ServiceMethod := MethodAddress(Func); if Assigned(ServiceMethod) then Result := ServiceMethod(Self, ClientIdent, Args) else Result := inherited ProcessRequest(Func, ClientIdent, Args); end; The problem code is one of the micro service method defined in the service's Published section: function TMyService.Init(const ClientIdent: TkbmMWClientIdentity; const Args: array of Variant): Variant; var ds: TDataset begin Result := ''; <---- raising "Invalid variant type" in 64 bit application ... end; The codes were working in 32 bit application, so I was wondering if there is something missing in the above ProcessRequest in 64 bit, but don't know what I'm missing.
-
[Firedac] Truncation error on Firebird select query
c0d3r replied to Jacek Laskowski's topic in Databases
Ah, OK. Sorry about that. I don't use FireDAC, I'm always using UIB to work with Firebird databases with UTF8/Unicode, I got the same error when I was using UTF8 to connect to a NONE set of Firebird database. -
[Firedac] Truncation error on Firebird select query
c0d3r replied to Jacek Laskowski's topic in Databases
I think you were using UTF8 character set while connecting a Firebird database which created with NONE/ANSI/... character set, which caused Firebird raised this exception. Its NOT a FireDAC issue. In order to make it works, either you use NONE character set while connecting to your database, or convert your Firebird database to UTF8. -
Using Delphi in Virtual machine for a month
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
One thing I don't like Hyper-V was that its always using host's DPI settings (e.g. under Full Screen mode), if the host DPI is set to 125%, you can't change Hyper-V to use other DPI settings. so I switched back to VMware. -
On Delphi 10.4.1 the MMX Code Explorer is mostly dead/inactive when running Delphi debugger
c0d3r replied to panie's topic in MMX Code Explorer
You have CnWizard installed, could be where the issues came from: 13B1230C]{CnWizards_D104S.DLL} CnWizNotifier.TCnWizNotifierServices.DoMsgHook$qqrp20System.Classes.TListt1p6HWND__rx24Winapi.Messages.TMessage (Line 1948, "CnWizNotifier.pas" + 1) + $19 [13B123BF]{CnWizards_D104S.DLL} CnWizNotifier.TCnWizNotifierServices.DoMsgHook$qqrp20System.Classes.TListt1p6HWND__rx24Winapi.Messages.TMessage (Line 1959, "CnWizNotifier.pas" + 12) + $15 -
Any one know if IIF function works in FireDAC SQLite local SQL or not, I can't make it work: select iif(xx>0, 10, -1) as field1, .... from.. select iif(xx>0, 'Yes', 'No') as field1, ... from... select sum(iif(xx>0, 0, 1)) as field1, ... from ... field1 always returned blank/empty.
-
Our production back end database is Firebird, we just want to run some queries against in memory datasets at client side applications for reporting purpose, I was told FireDAC Local SQL was based on embedded SQLite3 (?) and doesn't need any other libraries since the entire engine codes are embedded directly into applications(?) Please let me know how to try another SQLite3 library?? Anyway, I'm working and testing with kbmMWMemSQL at the moment, so far its good although lack of some features, missing some standard SQL syntax like HAVING, .., etc.
-
Yeah, query is OK: "select clientid, sum(iif(price > 0, amount, 0)) as total_amount from sales group by clientid", ran the query with TxQuery, got right result, ran the query with Firebird iSQL, got right result too. Using SQLite Local SQL, it listed all the ClientIDs but the Total_Amount fields were all blank. In order to test "iif" works or not, I then tried FireDAC local sql demo program (the sample installed by Delphi 10.4.1) connected to demo db, 'select clientid, freight from qOrders' was working, but: "select clientid, iif(freight > 0, 10, -10) as test from qOrders" wasn't working, it listed all the ClientIDs but the "Test" fields were all blank.
-
The SQL statement works with TxQuery, works with Firebird, ..., pretty much all the modern SQL engines supported IIF function nowadays.
-
No, I didn't use SQLite3 explorer, I had few memory datasets (mostly from Reports), try finding a local sql engine to run queries against them. so far I found only TxQuery is working. However, if Delphi 10.4.1's Compiling Optimization is turned on (Release mode), it seriously screwed TxQuery engine codes and causing AVs, so I'm looking for an alternative, try FireDAC SQLite Local SQL, it doesn't work as long as using IIF function, try FireDAC samples/Local SQL demo, it doesn't work with IIF either.
-
Try deleting one component on an ancient form, causing all sorts of AVs on inherited forms. Turns out you have to open each inherited forms at design time after the deletion, to answer a dump question "if the reference is deleted or renamed"..., then save them. What were these $&&*%$$ EMBR guys thinking? The worse part was that some of inherited forms were OK no AVs and some of inherited forms weren't OK and AVs. Imagine if you have hundreds inherited forms....
-
I was told it was supported, but when I changed DPI from 100% to 125%, the IDE editor was way too blurred under my 4k resolution screen.
-
Great article, Thanks for the post.
-
I'm really frustrating with this dump "Welcome Page" implementation. Is it too hard to these guys to implement a "Welcome Page"??, Ever since 10.4 now 10.4.1, I have to disable this sh!t so that I could make Ctrl-Click works without crashing the Delphi with a fairly large project. Is that so difficulty to have a working "Welcome Page"?? I can't imagine how a software company would provide us a good/reliable system and they can't even make a "Welcome Page" working properly?!
-
Does anyone install 10.3.3/10.4 on a VMWare machine? I have installed Delphi 10.4 enterprise on a VMWare (15.5.6) machine, Win10 2004, 4K Resolution, 8/10GB Ram (Host has 32GB RAM), having some IDE editor speed issues, mainly related to the mouse wheel scrolling: 1) Open an unit, went to the end of unit, Do mouse wheel up/down on the source codes, you would see the source codes scrolling speed is very slow, took one second to scroll up/down a line. 2) Unchecked "Enable Flow Control Highlighting" from Tools/Options/Editor/Color/Structural Highlighting", then open an unit, do mouse wheel up/down on the source codes, also took one second to scroll up/down a line.
-
Delphi 10.3.3/10.4 IDE Editor on VMware speed issue
c0d3r replied to c0d3r's topic in Delphi IDE and APIs
Ah, It could be just the GUI. -
Delphi 10.3.3/10.4 IDE Editor on VMware speed issue
c0d3r replied to c0d3r's topic in Delphi IDE and APIs
It seems that they finally fixed my issues on VM with 4K monitor in Delphi 10.4.1 -
Delphi 10.3.3/10.4 IDE Editor on VMware speed issue
c0d3r replied to c0d3r's topic in Delphi IDE and APIs
Hmmm, just realized that my VMWare Workstation Pro was a 32 bit version, Does it has a 64 bit version? -
Does anyone know there is a good free Resource Builder utility that I can use to create .res file by importing bitmap, png, jpg, strings, ..., etc. Thanks.