Jump to content

programmerdelphi2k

Members
  • Content Count

    1406
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by programmerdelphi2k

  1. programmerdelphi2k

    iPhone statusbar color

    try this:
  2. programmerdelphi2k

    Unable to debug blank application on Android 12

    MORE INFO: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Android_Devices_Supported_for_Application_Development Verify if any "FIREWALL/ANTIVIRUS" is blocking or not!!! AIDA64 for Android by GooglePlay
  3. programmerdelphi2k

    VM and Legacy apps

    at general, VM's problem is: any specific external hardware access any specific graphical usage as all is "simulated on memory"
  4. programmerdelphi2k

    How to set IDE Style path

    @Gary you can try create a new "session" for you IDE using this: ......\bin\bds.exe /r NewNameToSession this create a "NEWand CLEAN" registry key to RAD Studio, then, you can use as your main link to load it if you use some third-party components, you need re-install the components [Components-Install package (BPLs)]" in your IDE. https://docwiki.embarcadero.com/RADStudio/Sydney/en/IDE_Command_Line_Switches_and_Options
  5. programmerdelphi2k

    Check if database table string field is empty or NULL??

    maybe... you can verify yourself!
  6. programmerdelphi2k

    Check if database table string field is empty or NULL??

    maybe.. you can read Firebird documentation if dont! https://www.ibexpert.net/ibe/pmwiki.php?n=Doc.CHAR a long text to reflect https://www.firebirdfaq.org/faq237/
  7. programmerdelphi2k

    Check if database table string field is empty or NULL??

    sorry typo! not "VAR(n)" but yeah "CHAR(n)"
  8. programmerdelphi2k

    The problem of running the app on IOS

    well, If your decision... then, luck!
  9. programmerdelphi2k

    Check if database table string field is empty or NULL??

    var MyVar: string; begin if ''.IsNullOrEmpty(MyVar) then // Result := Value = Empty; or if ''.IsNullOrWhiteSpace(MyVar) then // Result := Value.Trim.Length = 0; caption := 'null or empty' else caption := 'no-no-no';
  10. programmerdelphi2k

    How to set IDE Style path

    probable cause: you tried or installed the same IDE (version) on this computer and it didn't complete successfully!!! if yes, then many other problems may arise from there...
  11. programmerdelphi2k

    How to set IDE Style path

    to try "fix it" you can redefine the "BDSCOMMONDIR"...
  12. programmerdelphi2k

    The problem of running the app on IOS

    hi @kabiri first, I would to say that your code is not good!!! Sorry, but really it's necessary review it (I think that all project). Before developing a project, whether for the computer or for another activity, you should study what the tool offers you, and that it doesn't need to be reinvented. For example, in the code above you want to know the name of the category based on an informed value. OK? However, you are using a lot of code for a task that the database itself can provide for you without much effort. Every SQL database, or not, has mechanisms that were developed to offer the minimum effort to the developer. In the case above, you could simply create a "VIEW" query against the SQLite database to provide that information, as well as many others. This way, you wouldn't need to create so much code to get the same result and in a transparent way. A word of advice: make your database work for you, not the other way around! look my new sample for you using SQLite and creating a "VIEW" on database to easy access to informations in two tables (or more) look this sample for you: see my SQLite "MySQLiteDBTest001.db" and code on project https://mega.nz/file/r3gjmKwB#n5FILRJiqN-Jk3Yk7n97gDs2PlQi76Nvxgkd2HooLHE NOTE: In no time do I need to create a query to check the value of a piece of information in the table!
  13. programmerdelphi2k

    Check if database table string field is empty or NULL??

    note in SQL databases: CHAR( n ) = space is add on field to fill it <-- FIXED TYPO! not "VAR(n)" VARCHAR( n ) = no-space is add on field to fill it sometimes needs a "TRIM( ... )" to remove all spaces if none-char exists (if not automatic done by Delphi)
  14. programmerdelphi2k

    How to set IDE Style path

    hi @Gary you can try "delete" your ".DPROJ" file! IDE always recreate it again! This file inform what your configuration for your project... then, if using some in special, just re-config!
  15. programmerdelphi2k

    Processing PNG image

    maybe this way: https://stackoverflow.com/questions/59904761/transparent-png-image-loaded-from-resource-file-resized-with-grapics32-and-draw https://stackoverflow.com/questions/31271622/how-to-resize-png-image-with-alpha-channels-using-gdi
  16. programmerdelphi2k

    TRegEx.IsMatch question

    thanks to Stefan uses RegularExpressions; procedure TForm1.Button1Click(Sender: TObject); var RegEx: TRegEx; begin RegEx := TRegEx.Create('(^[\w\d]{1,5}$)'); // RegEx := TRegEx.Create('(^[\w\d]{5,5}$)'); // if RegEx.IsMatch('ab123') then ShowMessage('match found') else ShowMessage('not found'); end;
  17. programmerdelphi2k

    The problem of running the app on IOS

    I think that your "Configuration can be pointing to VCL project, not FMX"... look your Project Manager to see if you are using "FMX project" really!!!
  18. programmerdelphi2k

    The problem of running the app on IOS

    basically, FireDAC always needs a "TFDGUIxWaitCursor" to GUI dialogs, and a "PHYSxxxx" driver for your database used! then, you need it! the hierachy is: FDManager; // always created by default if not used in your project... all defined here will be inherited to next... FDConnection; FDQuery/FDTable etc.... my tip is: draw your DataModule by default on DesignTime... add your components: 1 FDxxxWaitCursor, 1 (or "n") FDPhysxxxxDriver, 1 FDConnection, "n" FDQueryxxxxx (so much than needs), DataSources, etc.. etc.. etc... create your DataModule (automatically before main form (Project->Options) or on create form, or on Initialization section of your first unit on project, normally UnitMainForm) code your FDConn initial params (if necessary, let for other place), now on "DataModuleCreate event" = OK! if you need use your FDQuerys on any form after your app loaded, then, declare your initial "SQL statement ", for example, "select ...", ELSE, let it empty! when necessary, just put your SQL text to use! as your DataModule is for use "global" now, then, in any unit you can use it!, ok? clause "USES" myDataModuleMain;
  19. programmerdelphi2k

    ExtendedMetadata and .AsInteger for small int column

    https://docwiki.embarcadero.com/RADStudio/Sydney/en/Extended_Metadata_(FireDAC) using "domain name" or size
  20. programmerdelphi2k

    ExtendedMetadata and .AsInteger for small int column

    have you used "Data MAPping Rules" to convert your FB field to Delphi usage?
  21. programmerdelphi2k

    How to read Stream(Image) from Parcelable?

    try some like this: procedure TForm1.Button1Click(Sender: TObject); var LIntent : JIntent; LString : JString; LParcelable: JParcelable; LURI : JNet_Uri; begin LString := LIntent.getExtras.getString(TJIntent.JavaClass.EXTRA_STREAM); // LParcelable := LIntent.getExtras.getParcelable(LString); LURI := TJnet_Uri.Wrap(LParcelable); LURI.getXXXXX; end;
  22. programmerdelphi2k

    New Installation of Rad Studio 10.2 (Tokyo)

    try "delete all dcus" or same "folder DCU target " to avoid use residual files!
  23. programmerdelphi2k

    The problem of running the app on IOS

    NOTE: you are using a "DataModule" then, there is not necessity create a "FDConnection" by code! just use a component FDConnection! same to "FDQuery"... just use a component with no-statement SQL! close, change the sql, open! if needs in many place, then, use another FDQuery! that way, you avoid create and kill it all time! look my sample using SQLite https://mega.nz/file/T34mlZ7J#L-wpnR2kes5NU9cRyTD1dYMmYLKq4EtroWETVjwYfuk
  24. programmerdelphi2k

    The problem of running the app on IOS

    NOTE: SQLite allow "create database/table" in your SQL instruction!!! no needs workaround!! var { ... any place visible for all tables (in any form) tasks! } FDConn: TFDConnection; procedure MyCreateFDConn; // any place visible!!! begin FDConn := TFDConnection.Create(nil); // release when no more necessary... in any place on project! FDConn.LoginPrompt := false; // avoid show default dialog!!! FDConn.Params.Clear; // verify your PATH it's ok for found DB on smartphone!!! FDConn.Params.Add('...'); // or FDConn.Params.AddStrings(['...', '...']); // ... end; procedure TForm1.FormCreate(Sender: TObject); // just for my tests... Adapt it for your case! var FDQry: TFDQuery; begin // FDQry := TFDQuery.Create(nil); try FDQry.Connection := FDConn; FDQry.Open('...your Select statement'); // or FDQry.ExecSQL('...your Insert, Delete, Update statement'); finally FDQry.Free; // when it's not more necessary!!! if used in many places, then, use a "global var"... if you want! or not! end; end; initialization // if used on first unit of your project and used for all units MyCreateFDConn; finalization FDConn.Free; end.
  25. programmerdelphi2k

    New Installation of Rad Studio 10.2 (Tokyo)

    you need pay attention on follow: the third-party components dont have source, ok == but was compiled for your current IDE? you create and release from memory ? can show some code where you think that all occurs?
×