-
Content Count
1406 -
Joined
-
Last visited
-
Days Won
22
Everything posted by programmerdelphi2k
-
try this:
-
Unable to debug blank application on Android 12
programmerdelphi2k replied to havrlisan's topic in Cross-platform
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 -
at general, VM's problem is: any specific external hardware access any specific graphical usage as all is "simulated on memory"
-
@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
-
Check if database table string field is empty or NULL??
programmerdelphi2k replied to Ian Branch's topic in General Help
maybe... you can verify yourself! -
Check if database table string field is empty or NULL??
programmerdelphi2k replied to Ian Branch's topic in General Help
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/ -
Check if database table string field is empty or NULL??
programmerdelphi2k replied to Ian Branch's topic in General Help
sorry typo! not "VAR(n)" but yeah "CHAR(n)" -
well, If your decision... then, luck!
-
Check if database table string field is empty or NULL??
programmerdelphi2k replied to Ian Branch's topic in General Help
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'; -
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...
-
to try "fix it" you can redefine the "BDSCOMMONDIR"...
-
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!
-
Check if database table string field is empty or NULL??
programmerdelphi2k replied to Ian Branch's topic in General Help
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) -
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!
-
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
-
TRegEx.IsMatch question
programmerdelphi2k replied to karl Jonson's topic in Algorithms, Data Structures and Class Design
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; -
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!!!
-
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;
-
ExtendedMetadata and .AsInteger for small int column
programmerdelphi2k replied to TurboMagic's topic in Databases
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Extended_Metadata_(FireDAC) using "domain name" or size -
ExtendedMetadata and .AsInteger for small int column
programmerdelphi2k replied to TurboMagic's topic in Databases
have you used "Data MAPping Rules" to convert your FB field to Delphi usage? -
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;
-
New Installation of Rad Studio 10.2 (Tokyo)
programmerdelphi2k replied to fe-hre's topic in General Help
try "delete all dcus" or same "folder DCU target " to avoid use residual files!- 22 replies
-
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
-
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.
-
New Installation of Rad Studio 10.2 (Tokyo)
programmerdelphi2k replied to fe-hre's topic in General Help
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?- 22 replies