Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all 1888 articles
Browse latest View live

How to run a c++ builder application on PC/device that does not have Embarcadero?

$
0
0

I have been trying to run my applications on other pc but they do not work because they don't have Embarcadero, how can i solve this problem


NSURLRequest ios to connect to datasnap server via tunnel

$
0
0

Hi

 

I have an existing iOS app with complex UI. Swift and objc.

 

This app must connect to a datasnap server app.

 

The objc connectors generated by rad studio does not implement the tunneling connection. Only unsecure http REST connection :(

 

Yet the app is able to open the tunnel and get the session ID (put request to /tunnel with dss=0 into the querystring). By after that, the authentication fails.

How to format the connect, get and post requests, (URL, header, query and body) ?

 

Thank you for your help !

Regards

 

 

Retrieving unicode strings from SQLite using FDQuery

$
0
0

I have a delphi 10.2 application that uses SQLite to store unicode strings - but am unable to retrieve them and display in a Label (or other) without loosing the unicode characters.

I can see that they are correct in the SQLIte database ... and also that the database is using UTF8 encoding.

However - when I run a simple query using TFDQuery the resulting string replaces the characters (simplified example below).

   FDQuery.SQL.Add('select unicode_field from table where id = 1');

   FDQuery.Open;

   Label.Text := SurveyQuery.FieldByName('unicode_field').AsString;

 I have tried returning the string as WideChar but that does not work... and also have set the encoding on the connection to be UTF8 (and others)

I believe I must be fundamentally misunderstanding how unicode works - but any information would be very much appreciated.    

KEYBOARD LAYOUT CHANGING ?

$
0
0

Hello,

I use Delphi Professional 10.1 Berlin for developing accounting software to my clients in Bulgaria.

 

When users start the application they change keyboard layout to Bulgarian. But when activate another form with ShowModal method  the keyboard automatically return to default keyboard layout, in this case English. How could I to prevent this ?

When running my Android APP on Android 7.x GUI Elements are disappearing

$
0
0

My Android APP runs fine on Android Version 5.0.2. But if i run the same APP on serveral Devices with Android 7.x The App works finde on first start but after restarting the APP some GUI Elements are disappearing. In my case 2 Images in my Listview Layout. Does anyone have a clue why this could happen? 

The images are stored in an ImageList.

I use Rad Studio 10.2 with all released Hotfixes for Android.

 

This is the Code i use to assign the images:

 

if Assigned(TmpProfile) then
        case TmpProfile.Status of
          Connected:
          begin
            //TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(TSizeF.Create(128,128), 0);
            TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(RectListViewImage3, 0);
            StatusStr := 'Connected';
          end;
          Disconnected:
          begin
            //TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(TSizeF.Create(128,128), 1);
			      TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(RectListViewImage3, 1);
            StatusStr := 'Disconnected';
          end;
          Connecting:
          begin
            //TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(TSizeF.Create(128,128), 2);
            TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(RectListViewImage3, 2);
            StatusStr := 'Connecting';
          end;
          else
          begin
            //TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(TSizeF.Create(128,128), 3);
            TListItemImage(ListView1.Items[I].Objects.FindDrawable('Image3')).Bitmap := ImageList1.Bitmap(RectListViewImage3, 3);
            StatusStr := GetErrorMessage(TmpProfile.Status);
          end;
        end;

Is there someone with similar problems?
 

TWebModuleList

$
0
0

My program is a Delphi ISAPI DLL built with Delphi 2007. I'm migrating to Delphi 10.2 Tokyo and TWebModuleList is gone from Web.WebReq.

With D2007, when the application starts, the following code is called in order to pre instanciate a pool of 5 WebModules.

procedure TSWebApplication.CreationWebModules;
var
i: integer;
TabDataModules : array of TWebModuleList;
begin

SetLength(TabDataModules,1);
TabDataModules[0] := ActivateWebModules;
if Assigned(TabDataModules[0]) then
TabDataModules[0].AutoCreateModules;

SetLength(TabDataModules, NbInstances);

for i := 1 to NbInstances - 1 do
begin
TabDataModules[i] := ActivateWebModules;
if Assigned(TabDataModules[i]) then
TabDataModules[i].AutoCreateModules;
end;

for i := 0 to NbInstances - 1 do
DeActivateWebModules(TabDataModules[i]);
end;
This way, instead of having the (first 5) WebModules created on demand, they are created when the application starts, then deactivated and auto activated on demand.

I know WebModules are managed by IIS and we don't necessary need this behavior, but it is the way it worked (pretty well).

TWebModuleList seems gone since Delphi XE8 (no page on docwiki whereas it was still there on the XE7 site (http://docwiki.embarcadero.com/Libraries/XE7/en/Web.WebReq.TWebModuleList)). I couldn't find ANY changelog, or other information on why it is gone et how we can build the same behavior...

Does anyone have any information?

Thanks

ilink64 access violation (10.2.1)

$
0
0

C++Builder ilink64.exe access violation. Application using 3rd party tools. DevExpress PivotGrid/QuantumGrid + TMS + Mitov Instrunet. Builder prior to 10.1 would give out of memory error. 10.2 gives access violation. Application links fine with ilink32 for 32bit application. Runs fine. Is there a known bug in ilink64 that I should use some work around for? What is the best place to start to break down the problem? TIA

Pop-up menus closes immediately on MacOS High Sierra 10.13

$
0
0

Create a new Firemonkey C++ Builder application for MacOS

add a StringGrid

add a Popup menu

add some menu items

connect the pop-up menu with the string grid.

Run the app on MacOS 10.12.6 and the pop-up menu will appear normally when right-clicking on the StringGrid, but on MacOS High Sierra 10.13 it will disappear immediately after showing.


How do you make a REST call setting the parameters in code?

$
0
0

I am having an issue here...

I am trying to access a REST service for payment processing.  The URL for the specific call I am trying to make is here:

https://developer.payeezy.com/payeezy-api/apis/post/transactions/tokens

You may not be able to see it unless you sign up to be a developer, not sure on that.

I have jumped through the hoops to create the 6 parameters that they say are required for the call.  I made the call and got the following error: "Error querying headers: (87) the parameter is incorrect."

I have tried several ways of executing the command.

In each of the three methods (the first two require the clearing of parameters) the result is the same.  None of the parameters is blank, yet tracing into the code it seems to be that it is looking for a parameter with no name.  The call stack shows a call to TWinHTTPRequest.GetHeaders which calls ReadHeader (where the error is happening).  The calls are in the unit System.Net.HttpClient.Win.   The last method assumes that the parameters were already defined in the TRestRequest component while the first two clear the params and add them back. What am I doing wrong?

procedure TForm1.btnGenerateClick(Sender: TObject);

var

  Payload : String;

  PayeezyCall : IPayeezyCall;

 

begin

  Payload := GetPayload;

  PayeezyCall := NewPayeezyCall(Payload);

  with RESTRequest1 do

    begin

//      Params.Clear;

 

//      Params.AddUrlSegment('apikey', HTTPEncode(PayeezyCall.APIKey));

//      Params.AddUrlSegment('token', HTTPEncode(PayeezyCall.Token));

//      Params.AddUrlSegment('Content-type', HTTPEncode(PayeezyCall.ContentType));

//      Params.AddUrlSegment('Authorization', HTTPEncode(PayeezyCall.Authorization));

//      Params.AddUrlSegment('nonce', HTTPEncode(PayeezyCall.Nonce));

//      Params.AddUrlSegment('timestamp', HTTPEncode(PayeezyCall.TimeStamp));

 

//      Params.AddHeader('apikey', HTTPEncode(PayeezyCall.APIKey));

//      Params.AddHeader('token', HTTPEncode(PayeezyCall.Token));

//      Params.AddHeader('Content-type', HTTPEncode(PayeezyCall.ContentType));

//      Params.AddHeader('Authorization', HTTPEncode(PayeezyCall.Authorization));

//      Params.AddHeader('nonce', HTTPEncode(PayeezyCall.Nonce));

//      Params.AddHeader('timestamp', HTTPEncode(PayeezyCall.TimeStamp));

 

      Params.ParameterByName('apikey').Value := HTTPEncode(PayeezyCall.APIKey);

      Params.ParameterByName('token').Value := HTTPEncode(PayeezyCall.Token);

      Params.ParameterByName('Content-type').Value := HTTPEncode(PayeezyCall.ContentType);

      Params.ParameterByName('Authorization').Value := HTTPEncode(PayeezyCall.Authorization);

      Params.ParameterByName('nonce').Value := HTTPEncode(PayeezyCall.Nonce);

      Params.ParameterByName('timestamp').Value := HTTPEncode(PayeezyCall.TimeStamp);

      Resource := PayeezyCall.Payload;

      try

        Execute;

      except

        eGenerate.Lines.Text := RestResponse1.Content;

      end;

    end;

end;

 

 

Help system degraded in Tokyo?

$
0
0

Hello, Just upgraded from XE5 to Tokyo 10.2.1.  Working in Windows 10. The Help system seems entirely different, and far less useful, so I'm thinking I perhaps have a wrong version of the help reader installed somehow. When I search, I get no summaries of the topics that are found - instead just a long list in the index viewer.  In the browser window, I get only one topic at a time, so to find what I need, I would have to look at every relevant topic one by one, instead of just scanning the results page. Has anyone experienced this and how do I fix it?   Thanks.  

How to use ACompletionHandlerWithError

$
0
0

I have an application that uses TRestRequest with the ExecuteAsync method.

When an error occurs, such as a wrong URL, it returns no error to the application.

Studying the Rest.Client drive I have seen that there is an ACompletionHandlerWithError parameter which, according to the documentation, can execute a method whenever there is an error.

Could someone send me an example? I could not make it work

ADO and RAD Studio

$
0
0

Hi all,

I'm brand new to RAD Studio (Delphi for win32, free), since I'm coming from "old" Borland Turbo Delphi - I'm a hobby developer, not sure a pro one - and just few days ago I've installe RAD Studio 12.2 for the first time.

I've tried to import a project I wrote years ago With Turbo Delphi, a recipes manager based on ADO databases, but I get (obviously) a component error because RAD Studio can't load TADOTable, TADODb, and so on.

So my question is: is there a way to load ADO components in Rad Studio, and - if yes - where can I find the component suite? And, if not, must I rewrite the whole code using TDB components in place of TADO components.

 

Thanks and cheers,

Melantho

How to create a Delphi Application in which Authentication Parameters are already defined to Run As Administrator?

$
0
0

I want to Run this application across my Domain without any Access Issues and Dont want to share the Domain Admin Password with anyone else.

team installation

$
0
0

Hi,

we have a team of three developers, two of them (pc1 and pc2) using delphi xe5 pro, the other (pc3) using all versions of delphi enterprise from xe5 to 10 Seattle (with a subscription license). 

In order to upgrade our applications, we plan to upgrade all machines to delphi 10.2 Tokyo buying and installing the two new professional versions on pc1 and pc2 and installing the enterprise with subscription on pc3.

A few months ago, in a Delphi event, we won an architect license, so we need to buy only 1 pro license.

The question is:

can we use this schema of installation: pro on pc1, ent on pc2 and arch on pc3

or there's some check licences process that force me to install the enterprise license on the pc with all other enterprise versions? In other words having this schema: pro on pc1, arch on pc2 and ent on pc3?

Thanks.

Emilio.

 

Font Styles on TRichEdit

$
0
0

I can programmatically change the Font used but can't change the Style.  If I choose fsBold, fsUnderline or any other style it is still just like I used TFontStyles() and have no Style assigned.  This is in C++ 10.2.  Have tried multiple ways to do this but none have worked.  Even assigning the style using the Properties of the Control did not work. 


FireDAC (Array DML) Query.Execute(100000) = access violation

$
0
0

FDQuery.Params.Clear;

FDQuery.SQL.Text:='begin INSERT INTO ' + FTable + ' (F1, F2, F3, F4, F5, F6, F7, F8) '+

                  'VALUES(:M1, :M2, :M3, :M4, :M5, :M6, :M7, :M8);'+

                  'exception  when others then pkg_loaddata.LogError(3,''Error '+FTable+''',SQLErrm(),0);rollback; end;';

FCount:= 10000;

 

FDQuery.Params.ArraySize:= FCount;

 

for I := 0 to FCount-1 do

begin

  FDQuery.ParamByName('M1').AsDateTimes[I]:= M1[i];

  FDQuery.ParamByName('M2').AsDateTimes[I]:= M2[i];

  FDQuery.ParamByName('M3').AsStrings[I]:= M3[i];

  FDQuery.ParamByName('M4').AsStrings[I]:= M4[i];

  FDQuery.ParamByName('M5').AsStrings[I]:= M5[i];

  FDQuery.ParamByName('M6').AsIntegers[I]:= M6[i];

  FDQuery.ParamByName('M7').AsIntegers[I]:= M7[i];

  FDQuery.ParamByName('M8').AsIntegers[I]:= M8[i];

  { SetData}

end;

FDQuery.Execute(FDQuery.Params.ArraySize);

 

if FCount >=100 000 then ACCESS VIOLATION

Vcl.Menus: TextToShortCut does not work fine in Delphi 10.2. Tokyo

$
0
0

Delphi 10.2. Tokyo: Vcl.Menus function TextToShortCut(Text: string): TShortCut; returns an empty TShortcut for inputs like SHIFT+F2 or CTRL+F4The shortcut return is fine for ALT+something or Fx shortcuts. The same function worked fine in older Delphi versions (ex. XE5). Does anyone have a solution for this?

URL encoding for API

$
0
0

I am using TRestClient and TRestRequest to send a Get request to an API.  The API has a parameter of username and password.  However, my password contains a plus sign (+).  So I use HTTPEncode to URL encode the password (changes the plus sign to %2B).  However, it still does not work.  If I change my password and take out the plus sign, the request works fine.  However, I may have other users that will have characters in their password that will need to be URL encoded.  Is there something else I need to do to have TRestRequest use the URL encoded password?

Delphi killer

$
0
0

Hi all,

I am unable to use my Delphi Enterprice Tokyo any more!

I experience a seamingly unsolvable problem in that essential packages from the '..19/bin' folder are resized to 0 kbyte. Full stop!

I run Windows 10 Professional on an i5-8Gb laptop running perfect.

Windows Defender is switched off, and McAfee Total Protection is the virus scanner. Such scanners are suspected in this respect, but after adding all Delphi .EXE files to the Real-Time-Scanner's exclusion list, the problem persisted.

I did numerous re-installations, but when starting Delphi, it immediately ruins some of its own packages. Or at least, it looks like it does so.

Re-sellers and Embarcadero's support sites seem closed or unreachable. I am getting desperate.

 

Can anyone help me out?

Jan

License transfer

$
0
0

How can I transfer my license to another employee in my company?

 

Viewing all 1888 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>