-
Content Count
1406 -
Joined
-
Last visited
-
Days Won
22
Everything posted by programmerdelphi2k
-
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
a test using a XLS file Excell 2003 by FireDAC ODCB 32bits on MSWin 10 ... nothing more!!! I not use (not installed) MSOffice in my system ODBC_Excell_sheet.7z -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
as said on Help: and, as we can change the "directional" mode, then is necessary check it. -
I think that by design, Embarcadero do it to minimize all compleXity between platforms... if was possible. then, you need just 1 TStyleBook to many "items" (platform flags) definitions in the same place (screen). be to load or define it on designtime (or same in creating on runtime,complicate but possible I has tryed and it's works) each one with its particularity... if "I agree" or not, does not matters, at all. if it's ok for you, it's ok! else, ... at end, for while, it's that way! maybe change someday. as usual.
-
for FMX form with 2 platform (MSWindows and Android) style defined = a TImage empty!!! object Form1: TForm1 Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 480 ClientWidth = 640 FormFactor.Width = 320 FormFactor.Height = 480 FormFactor.Devices = [Desktop] DesignerMasterStyle = 0 object StyleBook1: TStyleBook Styles = < item ResourcesBin = { 464D585F5354594C4520322E3501060B496D616765315374796C650246005450 46300654496D61676500095374796C654E616D65060B496D616765315374796C 650E4D756C74695265734269746D61700E01000005416C69676E070643656E74 65720000} end item Platform = 'AndroidL Light' ResourcesBin = { 464D585F5354594C4520322E3501060B496D616765315374796C650246005450 46300654496D61676500095374796C654E616D65060B496D616765315374796C 650E4D756C74695265734269746D61700E01000005416C69676E070643656E74 65720000} end> Left = 176 Top = 152 end end
-
as you should know, each "enviroment" is distinct in many aspect!!! then, needs a particular approach for it! VCL and FireMonkey are distinct too! then, needs an particular approach too! before, the style was a "binary" file, now is a 'text".. you can open "*.style" file in your notepad and see for yourself! you'll see this line: for sure, internally, the "flag" will be used to special processing. if exists so much possibility, why put all in the same place? Is TImage in VCL the same as TImage in FMX? And why not? Are there any technical or design reasons?
-
maybe a conflict between "residual" files (old edition) persistents and new install... dcu or bpl I always prefere uninstall (first) and install (new). deleting all folders and residual files from old install, except the license keys in c:\ProgramData... in last case, I would try a clean install!!!
-
Stuck half way through fixing the XE4 help system
programmerdelphi2k replied to Edwin Yip's topic in Delphi IDE and APIs
and H2Reg? https://www.helpwaregroup.com/products/h2reg http://kb.helpwaregroup.com/product-h2reg/h2reg-faq/h2reg-installers http://kb.helpwaregroup.com/mshelp2/borland-h2-help http://kb.helpwaregroup.com/mshelp2/h2-info -
Stuck half way through fixing the XE4 help system
programmerdelphi2k replied to Edwin Yip's topic in Delphi IDE and APIs
did try install just only the "Microsoft C++ Redistributable and Visual Studio 2008" for Win7? https://www.microsoft.com/en-us/download/search.aspx?q=visual studio sdk note: https://answers.microsoft.com/en-us/windows/forum/all/ms-help-2x-runtime-download/038c8455-e209-4694-b500-42936d934d07 -
Help on reading values from a JSON array
programmerdelphi2k replied to Magno's topic in Network, Cloud and Web
You has many levels in this JSON... some like this... uses System.JSON; procedure TForm1.Button1Click(Sender: TObject); var s : string; jv: TJSONValue; ja: TJSONArray; jo: TJSONObject; jp: TJSONPair; begin s := '{"A":0,"B":0,"C":1,"D":0,' + { } '"K":{"T":"X","acc":81,"max":116},' + { } '"result":[{"type":{"TP":30.3,"message":"Added successfuly"},"time":503,"flex":"yes"}]}'; // try jo := TJSONValue.ParseJSONValue(s) as TJSONObject; // if JSON is good, go ahead. Else, break with an Exception! // try jp := jo.Get('result'); // 'K', 'result' // direct to the point! Memo1.Text := jp.JsonValue.ToString; // if jp.JsonValue is TJSONObject then for var i: integer := 0 to TJSONObject(jp.JsonValue).Count - 1 do begin // Memo1.Lines.Add(TJSONObject(jp.JsonValue).Pairs[i].ToJSON) Memo1.Lines.Add(TJSONObject(jp.JsonValue).Pairs[i].JsonString.ToString + ' is ' + TJSONObject(jp.JsonValue).Pairs[i].JsonValue.ToString); end else // array begin for var A in TJSONArray(jp.JsonValue) do if A is TJSONObject then for var z: integer := 0 to (TJSONObject(A).Count - 1) do Memo1.Lines.Add(TJSONObject(A).Pairs[z].JsonString.ToString + ' is ' + TJSONObject(A).Pairs[z].JsonValue.ToString); end; except // PAIR not valid!!! Key not found... end; // // Memo1.Lines.Add('-----------------'); // // walking on the road... for var O in jo do begin Memo1.Lines.Add('Object: ' + O.JsonString.ToString); // if O.JsonValue is TJSONArray then begin for var A in TJSONArray(O.JsonValue) do begin Memo1.Lines.Add('...Is an Array: ' + A.ToString); // ... recursive function here... end; end else // is an object... but... "if" is a array... needs a recursive too??? begin Memo1.Lines.Add('...Not an Array is Object: ' + O.ToString); end; end; except // JSON not valid!!! end; end; -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
I understand! maybe some necessity of clean old read... like clear cache on memory... each read needs a transaction roolback or commit ... did try? Firedac create 1 transaction internally for when not explicitly created. -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
SELECT * FROM tableX where invoice = 99 OR invoice = 98 ---- invoice in (98,99) ... invoice between 98 to 99 -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
im on cell now, then the point is: connections string ok... yeah db opened fdquery sql open the records (all records without any "where") and show my fields choiced? yeah table opened then just now use your filter, like "where" above did you try this? -
bang! bang! stay closed with me, baby! 😂
-
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
first, you need test your connection string, if ok... 2nd, fdconnected, now you need just a fdquery as usual. 3rd, in fdquery, the sql xpression is the same than any other table access, same fields declaration, and others filters. nothing different than others data sources. you see? -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
why do you need ClientDataset? some special? fdQuery can save in disk too!!! did you know? -
D11 Update 1 + FireDAC + ODBC to Sage returning wrong data!
programmerdelphi2k replied to Jasonjac2's topic in Databases
hi @Jasonjac2 if your problem is about use ODBC in FireDAC, you can do it as usual in any other case, for example: Excell file access: with ODBC installed in your PC, 32 or 64bits edition in MSWin use ODBC tools (see in Control Panel or any other shortcut in MSwin) and create a "DNS" file with all setup necessary to access your EXCELL file. open this file and see what is necessary to config your FDConnection FireDAC in Delphi, in FireDAC you'll needs this components: a FDxxxWait, FDxxPhysODBC driver, FDxxxConnect, FDxxQuery, basically. now, just config your FDConnection you can use ADVANCED config to put all DSN file config (the string connection). it's simple way. now connect your FDQuery on FDConnection and fill your SQL to easy usage, use "PARAMS" in FDQuery to change the values on "where" clause, for example. fdqry.close; fdqry.Param.clear; fdqry.SQL.Text:= 'select .... from .... where YourField = :YourParamName'; fdqry.Param.ParamByName( 'YourParamName' ).AsInteger := 11111; fdqry.Open; .... when you need change the value on Param, just use this: fdqry.Param.ParamByName( 'YourParamName' ).AsInteger := 22222; fdqry.Refresh; https://intercom.help/ssgpenelope/en/articles/5189639-how-to-create-an-odbc-data-connection-in-excel https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_ODBC_Data_Source_(FireDAC) -
JEDI Installation Annoyances 10.4
programmerdelphi2k replied to PeterPanettone's topic in Tips / Blogs / Tutorials / Videos
Delphi 7 there is not more support or it's shiped!!! if exists on Internet is not by Embarcadero, you see? dont lost your time with: "it's better" "it's cool", etc... go ahead, if it's good for you, it's good!!! -
JEDI Installation Annoyances 10.4
programmerdelphi2k replied to PeterPanettone's topic in Tips / Blogs / Tutorials / Videos
for sure you can do it this way... "IF..." the bpl is the same version than your IDE. pay attention ! (including is Debug or Release mode for DCUs files).. at end, all compilation and building will create a "BPL" in the Public (or in arbitrary folder) defined... then, it's ok if it's ok! summary: look at: BPL and DCP sub-folders... and see if the same pacakges names is in!!! xxx.BPL and xxx.DCP (basically to VCL, ) the DCU files is used to compose your final binary, then, you'll need it! else, you'll need PAS files, because the DCU will be create from it! -
Disable then Enable a Procedure
programmerdelphi2k replied to Henry Olive's topic in RTL and Delphi Object Pascal
using "conditionals" is going to make it very unsafe... any other method can undo... better "nil" ED, then nothing will happen! for sure! NOTE: OF COURSE, ,any other method can UNdo it (nil...) too... but this "way" is done by default when building your class on Delphi. -
Best Practice Question: Bidirectional EXE-to-EXE communication
programmerdelphi2k replied to Alexander Halser's topic in RTL and Delphi Object Pascal
maybe better place would be Embarcadero... Malcolm Grooves blog is good for basic understanding... (above) https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_App_Tethering https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connecting_to_Remote_Applications_Using_App_Tethering note: behind scenes = Indy -
Best Practice Question: Bidirectional EXE-to-EXE communication
programmerdelphi2k replied to Alexander Halser's topic in RTL and Delphi Object Pascal
AppTethering is understood just publish info, basically. Malcom know it better than me -
JEDI Installation Annoyances 10.4
programmerdelphi2k replied to PeterPanettone's topic in Tips / Blogs / Tutorials / Videos
but I think that Community would accept a install (manual) by packages... open each DPKs and build+install (design time packs) (in order, put path on IDE, etc...) see GROUP files to see what DPK is used... and the order to build it -
JEDI Installation Annoyances 10.4
programmerdelphi2k replied to PeterPanettone's topic in Tips / Blogs / Tutorials / Videos
solution: RAD non-Trial/Pro/Enterprise! try download and install in a VM same that TRIAL... and test -
Best Practice Question: Bidirectional EXE-to-EXE communication
programmerdelphi2k replied to Alexander Halser's topic in RTL and Delphi Object Pascal
at end... AppTethering use TCP UDP protocol behind scenes http://www.malcolmgroves.com/blog/?p=1854 Edit: the beggin: http://www.malcolmgroves.com/blog/?p=1842 -
Disable then Enable a Procedure
programmerdelphi2k replied to Henry Olive's topic in RTL and Delphi Object Pascal
or this: type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private procedure OrThisProc(Sender: TObject); public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} type TMyProcX = procedure(Sender: TObject); var MyProcX: TMyProcX; MyProcY: TNotifyEvent; // = procedure(Sender : TObject) of object; <-- in this case, Object = Form1 procedure HelloWorld(Sender: TObject); begin end; procedure TForm1.OrThisProc(Sender: TObject); begin end; // to better understanding... it was edited: begin // when it shouldnt be used MyProcX := nil; MyProcY := nil; // when, it should be... MyProcX := HelloWorld; MyProcY := OrThisProc; // before any use, test it if Assigned(MyProcX) then MyProcX(Sender); // if Assigned(MyProcY) then MyProcY(Sender); end.