Delphi

59K

Solutions

17K

Contributors

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi.

We have a legacy application, made with delphi, and we´re having a strange issue on Windows 10.

When we input login credentials in the application, it uses "Registry.OpenKeyReadOnly" and verify for a key in HKEY_LOCAL_MACHINE\SOFTWARE\<appname>.
Then it uses Registry.ValueExists, if the key doesn´t exist, it gives an error "please install application". If exists, it proceeds with login.

We never had an issue with Windows 7, both x86 and x64.

Recently we upgraded our stations to Windows 10. And the application was working for weeks. Now, some stations (some x86 and others x64) are returning the "please install application" error, even if the key exists. That happened in 4 stations yesterday, and today another 3 started having the same problem.

And that just happens with the current local user. If we run as administrator, it works. If another non admin user logs on that machine, it works too. If the same user logs in another machine, it also works (even if the current user in that machine is having the login issue).

I thought it might be a permission problem, but with Powershell, if I run "Get-ItemProperty Registry::HKEY_LOCAL_MACHINE\SOFTWARE\<appname>" I get all the keys informations. I can also see the keys with regedit.

Then I thought about some recent windows update, but my user (non admin) can login with the application in another station with all updates installed, and doesn´t work in mine.

Any ideas? Really lost here.
0
Exploring SharePoint 2016
LVL 13
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Delphi XML Data Bindings are proving tough to code for me. Learning how-to the correct way is my goal here. With the attached XML file, I am simply stuck as to the next thing I do to get any data into a memo control.

I am using Delphi 10.3 Community version, and am creating a new firemonkey app.

If someone could show how to get the most basic data out from the XML file attached onto a memo, it would be a great leap forward for me.

For clarity, I'm pretty much new to Delphi and I have tried many online resources (videos, tutorials, blogs) to get to grips with this, but even the included Delphi help file has minimal information as guidance.
MAIN2.xml
MAIN2.xdb
0
I have developped a service using Delphi XE10.1 Berlin.
One timer interval is T1, the other is T2 (20 and 120 seconds respectively).
The first when activated, processes some input and send emails using email component accordingly.
The second just write a line in a log file.
Sometime the input to process is very large, and it can last for 3 minutes.
What is strange, is that the other timer, that should be activated during that interval is not.
Is this related to the heavy work of the other ?
Shall I place a kind of ProcessMessages (not available in TService component) or something else to have the second timer working during the working time of the first one ?
Thanks
0
I have copied an example of a mirror image generator from Delphi.com with a view to using it in a C++ builder project.

I get the following error in the iteration of the for loop:

First chance exception at $74CBC5AF. Exception class EInvalidOperation with message 'Can only modify an image if it contains a bitmap'. Process BitmapMirror.exe (7408)

The code is as follows:

void __fastcall TForm1::Button1Click(TObject *Sender)
{   // load an image file into Image1
	// reverse the horizontal image (make a mirror image) and display in Image2
	TBitmap *bm;
	int i,j;
	TColor c;

	if(OpenDialog1->Execute())
	{
		Image1->Picture->LoadFromFile(OpenDialog1->FileName);
	}
	bm = new TBitmap();
	bm->Height = Image1->Height;
	bm->Width = Image1->Width;
	for(i=0;i< Image1->Width;i++)
	for(j=0;j<Image1->Height;j++)
		bm->Canvas->Pixels[Image1->Width-i][j] = Image1->Canvas->Pixels[i][j];  // <<<<< This line produces the run-time error
	Image2->Picture->Assign(bm);
}

Open in new window

0
I am trying to execute the code above using a Access database and a Dephi program, and I receive the error message 'Syntax error in CONSTRAINT clause' on clause ON DELETE CASCADE. How can I alter the Access Database Schema, creating one relation with ON DELETE CASCADE, with Delphi?
Thanks

var
  bd : TADOConnection;
  qry : TQuery;
Begin
    bd.ConnectionString := 'Provider=Microsoft.ACE.OLEDB.12.0;' +
      'User ID=Admin;Data Source=;Mode=Share Deny None;Jet OLEDB:' +
      'System database="";Jet OLEDB:Registry Path="";Jet OLEDB:' +
      'Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:' +
      'Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;' +
      'Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:' +
      'New Database Password="";Jet OLEDB:Create System Database=False;' +
      'Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don''t Copy Locale on ' +
      'Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:'
      + 'SFP=False;Persist Security Info = False;';
    ConectionPropertyName := 'Data Source';
    bd.SetConnectionProperty(ConectionPropertyName, NomeBase);
    bd.connected := True;
    qry := TADOQuery.Create(Application);
    qry.Connection := bd;
    qry.sql.add('CREATE TABLE [MODELOHIDRODINAMICO] ([MDHID] INTEGER NOT NULL,'+
                '[MDHTITULO] VARCHAR(50) , PRIMARY KEY ([MDHID])');
    qry.sql.add('CREATE TABLE [VENTO] ([VENID] INTEGER NOT NULL,'+
                '[VENTIPODIRECAOGERAL] SMALLINT …
0
Hi

I use Delphi 10.3.

How can I load images from a resourcefile (.res) in a tImageCollection (I want to make an own component that uses tImageCollection and tVirtualImageList)?
similar like bmp.LoadFromResourceName('xy')

Thanks, Peter
0
I succeeded to migrated my large Delphi application from XE2 to XE10.1 Berlin
I use the IBX component
It works fine, except (not yet tested everything) for some TStoredProc (on XE2, everything was fine)
For example, I have this stored procedure in the Firebird database :

create procedure BriTay010 (Modele integer)
                   returns (Mini integer,
                            Maxi integer)
as
begin
 select min(Numero),max(Numero)
 from   Articles
 where  Modele_No = :Modele
 into   :Mini,:Maxi;
 Mini = nullif(Mini,0);
 Maxi = nullif(Maxi,0);
end^

Open in new window


And the code at execution  (F01 is a TForm, IBSP a TStoredProc object on it)

 F01.IBSP.Params.Clear;
 F01.IBSP.StoredProcName := 'BRITAY010';
 F01.IBSP.Params.CreateParam(ftInteger,'Modele',ptInput);
 F01.IBSP.Params.CreateParam(ftInteger,'Mini',ptOutput);
 F01.IBSP.Params.CreateParam(ftInteger,'Maxi',ptOutput);
 F01.IBSP.Params.ParamByName('Modele').AsInteger := someIntegerValue...;
 F01.IBSP.Prepare;
 F01.IBSP.ExecProc;

Open in new window


It crashed on the ExecProc :
Index XSQLDA out of range

No idea why, the parameters looks ok
0
Where can I find the procedure to be able to use TAcroPDF component in my Delphi application, that I migrated to Delphi XE10.1 Berlin ?
Thanks
0
I have copied the source of an Embarcadero C++ Builder XE2 project to a new PC and am trying to compile the project using Embarcadero C++ builder EX10.1 Berlin.
I get a compile error as shown below. the error is detected in a file called Functional. There is no such file in the Project folder.

Error message:

[bcc32 Error] functional(135): E2093 'operator<' not implemented in type 'string' for arguments of the same type
  Full parser context
    functional(134): decision to instantiate: bool operator less<string>::()(const string &,const string &) const
    --- Resetting parser context for instantiation...
    Unit2.cpp(6): #include Unit2.h
    Unit2.h(13): #include c:\program files (x86)\embarcadero\studio\18.0\include\dinkumware\map
    map(5): #include c:\program files (x86)\embarcadero\studio\18.0\include\dinkumware\xtree
    xtree(4): #include c:\program files (x86)\embarcadero\studio\18.0\include\dinkumware\functional
    functional(7): namespace std
    functional(131): class less<_Ty>
    functional(134): parsing: bool operator less<string>::()(const string &,const string &) const

The code where the compiler breaks is :

            // TEMPLATE STRUCT less
template<class _Ty>
      struct less
            : public binary_function<_Ty, _Ty, bool>
      {      // functor for operator<
      bool operator()(const _Ty& _Left, const _Ty& _Right) const
            {      // apply operator< to operands
            return (_Left < _Right);  //<<<<<<<<<<<<< This is the line which is shown as an error
            }
      };
0
I am migrating my Delphi XE2 application to Delphi XE10
It uses IBX to access (embedded) a FireBird database
Where can i find the (free) corresponding IBX compoments  to install it ?
0
PMI ACP® Project Management
LVL 13
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Does anyone know what language this is? It is embedded within our ERP system. I need to add the word Symptoms above Reason for removal.

begin

IF
   WO_SYMPT_FAUL_ACT['SFA_TYPE'] = 'Symptoms' then 
begin

  Text := 'REASON FOR REMOVAL:';
end
else if
    WO_SYMPT_FAUL_ACT['SFA_TYPE'] = 'Faults' then 
begin

  Text := 'FAULT:';
end 
else if
    WO_SYMPT_FAUL_ACT['SFA_TYPE'] = 'Actions' then 
begin

  Text := 'TESTED WITHIN MFG SPECS:';
end 
else
begin
  Text :=  WO_SYMPT_FAUL_ACT['SFA_TYPE']
end;
end;

Open in new window

code.JPG
symptoms.JPG
0
Hello,
I get this error message, when I want to connect to MariaDB via FireDAC.
Where can I download the needed dll's?

I have downloaded the "MariaDB Connector/C x.x Series"  zip-file from this website https://downloads.mariadb.org/. But the dll's were not there.
My program is a 32-Bit application

Error message
0
Is it possible in a Delphi application to terminate the application and shutdown windows (windows 10 ?)
0
I have upgraded (installed) Delphi XE10 from Embarcadero
Interbase Express is also install, I "see" in in the installed package
But when I use one like IBQuery (uses clause), it can't locate it
I suppose I missed something to reference it somewhere in the BDE options ?
0
I use FireDAC to Access a remote MySQL database and a local MySQL at the same time. For that I set up two TFdConnections.
The problem is that the two connections seem to affect each other.
When I switch off the remote MySQL Windows service I get long delays on the local connection.
When I pull the network cable from the remote machine the local connection is even completely blocked.


What causes this problems, the FireDac library or libmysql.dll and how can I solve it.
Thanks for your help, Bruno
0
I have tried to follow the Delphi Using FireDAC and SQLite  tutorial on this page:
http://docwiki.embarcadero.com/RADStudio/Rio/en/Mobile_Tutorial:_Using_FireDAC_and_SQLite_(iOS_and_Android)

It will not compile because I get an undeclared identifier for this line:
TDialogServiceAsync.InputQuery('Enter New Item', ['Name'], [''], Self.OnInputQuery_Close);

I have added fmx.dialogservice to the uses statement. That unit does have a proc named "InputQuery" but theparameters do not match up.

Does anyone know what unit I need to add to my uses clause, or if this tutorial no longer runs under Delphi 10.3?
0
CertificateError.PNGI had this question after viewing How do I add a client SSL certificate to a SOAP client in Rad Studio Delphi?.

I use Delphi 10.1 Berlin.
 I imported wsdl from file. I fill the object and then send data by calling its method.
It occurs an error that "certificate needed" as seen on attachment in Turkish language.
I could not solve this til now.

Best regards
0
Hi,

In my Delphi application I have a TFDStoredProc (name: aspCopyMyRecord) to access a MS SQL Server database.
Sometimes when the procedure below is executed, I get an error:
aspCopyMyRecord: Parameter '@ID' not found

procedure TDM3.CopyMyRecord(vID, vID2 : Integer; CONST vCode : String);
begin
  try
    with aspCopyMyRecord do
    begin
      ResourceOptions.UnifyParam := False;
      Close;
      StoredProcName := 'dba_CopyMyRecord';
      FetchOptions.Items := aspCopyMyRecord.FetchOptions.Items - [fiMeta];
      Command.FillParams(aspCopyMyRecord.Params);
      Prepare;
      Params.ParamByName('@ID').Value     := vID;
      Params.ParamByName('@ID2').Value  := vID2;
      Params.ParamByName('@Code').Value    := vCode;
      ExecProc;
    end;
  finally
    CheckReturn(aspCopyMyRecord);
  end;
end;

Open in new window


The parameters in SQL Server Stored Proc are named like:
CREATE PROCEDURE dba_CopyMyRecord( 
     @ID INT 
   , @ID2 INT
   , @Code nVarChar(50)
   , @ReturnValue INT OUTPUT)

Open in new window


Can anybode see what might be wrong with my code?
Thanks.
0
Cannot import a CSV file intl SQLITE using DB Browser for SQLITE.

It DOES work fine when the CSV file has around 1000 records, including  column names in the first record. But it fails when the CSV file has around 10000 records, yet the failure is on "record 1" which is the same regardless of how many records are in the CSV file.

The error message is "Error importing data from record number 1. Failing row had 9 columns but 11 values were supplied..." and it goes on to list the 11 values showing the last 2 values as "null,null". It really does have only 9 values and the CSV file really has only 9 comma delimited fields. I have examined the csv file using HEXEDIT and after the 9th value, it is followed by a carriage control and linefeed, (0D, 0A)  as each row is.

It  is as though there is a small memory area available to load the csv file into, and when that limit is exceeded, it corrupts itself in memory. Any ideas?

The CSV file is created by a Delphi program, so I can limit the number of records. A related problem was that the csv file contains a file name, like "myfile.txt" and the dot before the "txt" file extension was being treated like a comma. I had to change the program that creates the CSV file to use an underscore instead of a period, and it worked fine until the number of csv records got somewhere around 1000.


.
0
Fundamentals of JavaScript
LVL 13
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

I installed the update to Delphi, version 10.3, but I cannot select a target platform of Android. Under Project manager, I right clicked on "target platform" but the "Add" button is greyed out.

I downloaded Android Studio hoping that would let the Delphi IDE see that Android is an available target platform. Did not help.

I installed Delphi 10.3 on another pc, a machine with no software on it...it was reset to factory settings, and have the same problem there.

How do I make the Android platform available as a target platform?
0
I am working with Delphi Rad 10 seattle  Vcl version
I own a windows server and have a full control on it.
My Question is:
What is the fastest way to transfer files of what ever extension from my windows server to my PC and vice versa.
I would appreciate giving me  little sample...Is IdTCpServer\Client from indy enough good for that?
thanks in advance
0
I Made a simple  "server client"  program with IdTcpServer and IdTcpClient components created with Delphi rad seattled 10.
Is there an efficient way to make the server send  a data to the client at the moment when this client is connected.  
the data should contain several lines when each line Describes each client already connected to the server  ( Id, Age name ...etc)
Thanks in Advance!
0
I use Delphi Seattle.

I have problems with Indy components :
-Indy components cannot use those webpages which use TLS V3 connection because the web server rejects the connection.
The certification used is Encryption Everywhere DV TLS CA - G2

Error message:
IdStack
EIdSocketError
Socker Error # 10054
Connection reset by peer

The code:
  H := TIdHttp.Create(nil);
  SS := TStringStream.Create;
  H.Get(MyPath+'u_products.xml', SS) ;

Open in new window


I can use the Smtp server of Google with Indy

Ugyan ezzel a kóddal a Google SMTP szervere meghívható, így biztosan nem azzal van probléma.

SSL információk:

Issuer:
    CN=DigiCert Glob­al Root G2,OU=ww­w.digicert.com,O­=DigiCert Inc,C=­US
Serial:
    1844822487003892­1493073873828295­040723
Not valid before:
    2017-11-27 12:46­:40 UTC
Not valid after:
    2027-11-27 12:46­:40 UTC
Key size:
    2048
Signature Algorithm:
    sha256WithRSAEnc­ryption

subjectKeyIdentifier:
    78:DF:91:90:5F:E­E:DE:AC:F6:C5:75­:EB:D5:4C:55:53:­EF:24:4A:B6
authorityKeyIdentifier:
    keyid:4E:22:54:2­0:18:95:E6:E3:6E­:E6:0F:FA:FA:B9:­12:ED:06:17:8F:3­9
keyUsage:
    Digital Signatur­e, Certificate S­ign, CRL Sign
extendedKeyUsage:
    TLS Web Server A­uthentication, T­LS Web Client Au­thentication
basicConstraints:
    CA:TRUE, pathlen­:0
authorityInfoAccess:
    OCSP - URI:http:­//ocsp.digicert.­com
crlDistributionPoints:
    Full Name:­ URI:http://crl­3.digicert.com/D­igiCertGlobalRoo­tG2.crl
0
Hello,

I use Delphi Seattle.
My customer loads pictures in database using Devexpress TcxImage component.
In this component they can "paste" pictures from a browser.

Later I need to make thumbnail picture of this. And this is the problem:

-my "thumbnail creation" procedure is for jpg image
-so it works well if it is a jpg but I get Jpeg error #53 if it is a png picture

Question: how can I detect at the beginning if it is a png picture (remember that I cannot know it if the customer uses paste from a browser) and how can I transform it in jpg image?

Thank you very much!
0
I read a POP3 message in a TIdMessage component says M (idPOP3.Retrieve(MessageNumber,M))
But the Body has only one line, "This is a multipart message in MIME format.
The message content is (seen with gmail client) just a couple of simple text lines ...
So where are these text lines ?
0

Delphi

59K

Solutions

17K

Contributors

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.