ertank
Members-
Content Count
251 -
Joined
-
Last visited
-
Days Won
1
ertank last won the day on December 15 2024
ertank had the most liked content!
Community Reputation
29 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Hello, I want to conditionally change stock ImageListItemBottomDetail appearance TListViewItem (not the list but a single item) background color at runtime. Stylebook - background changes for whole background as far as I can see. Any help is appreciated. Thanks & Regards, Ertan
-
Hello, I tried to import below URL and resulting unit has errors. https://einvoiceserviceturmobtest.luca.com.tr/InvoiceService/ServiceContract/InvoiceService.svc?wsdl I don't know if WSDL is erroneous or Delphi cannot cope with it. I wonder if there is a way to have it imported properly. Any help is appreciated. Thanks & Regards, Ertan
-
Problem was indeed the packed. Removing it solved the problem. Thank you.
-
Hi, There is a DLL that has demo project in C#.NET code that I would like to convert into Delphi public struct AcquirerAmount { public uint id; public ulong amount; } public struct InposEcrPayment { public const ushort MAX_ACQUIRER_COUNT = 8; public ulong totalAmount; public uint totalCount; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public AcquirerAmount[] acquires; } So far I converted above struct as below but data incoming is not correct. I believe that Delphi conversion is not correct. TInposAcquirerAmount = packed record Id: UInt32; Amount: UInt64; end; TInposEcrPayment = packed record TotalAmount: UInt64; TotalCount: UInt32; Acquires: Array[0..7] of TInposAcquirerAmount; end; Any help is appreciated. Thanks & Regards, Ertan
-
I tested it on Android 12 and and it is working just fine. Original SO answer was missing the case match of the function and its declaration type which I should be careful for the next time. Thanks for the help.
-
Hello, Android has 24H/12H hour display format setting. I wanted to format my time values displayed as in system settings but I couldn't find how to read that specific is24HourFormat value. Delphi TFormatSettings does not include that information. There are earlier SO threads like this one. But that code gives me Invoke error: method not found. I also tried to import "android/icu/text/DateFormat" that I found in another SO answer and the app crashes without any error displayed. What would be the correct way to read that system setting? Thanks & Regards, Ertan
-
Speaking about Delphi 12.2 Inline Update 1. I am told that Windows 10 and Windows 11 changes the experience. Delphi is giving problems on Windows 11 and identical (down to installed components) system on Windows 10 works just fine.
-
Is it possible that the <RAD Studio>\bin\rsvars.bat file does not set all the necessary variables for MSBuild to work correctly?
ertank replied to dmitrybv's topic in Delphi IDE and APIs
When I was adding Delphi 12.2 in our build server I remember below value was missing in rsvars.bat BDSLIB=C:\Delphi12.2\lib You need to point it to your correct directory. -
Need to create a rest web server do I need IIS?
ertank replied to JIMSMITH's topic in Network, Cloud and Web
Answer to your question depends on your needs. I don't use ISS or Nginx for about 200 clients using MARS Curiosity as my REST server. mORMot2 is another Open Source Client-Server ORM SOA MVC framework and uses REST which tested to serve millions of requests under certain conditions. It is up to you to choose your REST server framework and any load balancer if you need it. -
If you want to prevent others accessing the data input in the application, you can encrypt a SQLite3 database and data will not be able to read by other software unless your encryption key and method is found. https://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.SQLite_Encryption_Sample There are a lot to consider for saving data to disk file or reading from it. A database system already handles these for you.
-
Below works for me without any exception. I see "All good" message and debugging shows data is actually in LResult variable. uses System.Net.HttpClient, System.Net.HttpClientComponent; procedure TForm1.Button1Click(Sender: TObject); var LHttp: TNetHTTPClient; LResponse: IHTTPResponse; LResult: string; begin LHttp := TNetHTTPClient.Create(Self); try try LResponse := LHttp.Get('https://www.google.com/index.html'); except on E: Exception do begin ShowMessage('Cannot communicate' + sLineBreak + E.Message); Exit(); end; end; if (LResponse.StatusCode < 200) or (LResponse.StatusCode > 299) then begin ShowMessage('Error status received'); Exit(); end; LResult := LResponse.ContentAsString(); ShowMessage('All good'); finally LHttp.Free(); end; end; You may want to test this code in a new project. If you do not get exception for google, but some other URL. You need to be sure that you are not downloading something binary. There are binary contents that can be retrieved using GET and these cannot be simply read as string. For example, I download my application update setup executables using GET into a TStream.
- 5 replies
-
- tnethttprequest
- delphi
-
(and 1 more)
Tagged with:
-
Hi, I do not see any problem that may raise such an error in the shared code. You might want to check other events assigned to f_NetHTTPRequest. Exception may be raising in them. If you are sure that TIndigoHttp.GetText() is where the error occurs then which line is it? What is the computer codepage that you are making tests. BTW, your request might complete without exception. But response received might be an error. I would check if "f_StatusCode" is in successful response range. In my own code I check it to be ">= 200" and "<= 299"
- 5 replies
-
- tnethttprequest
- delphi
-
(and 1 more)
Tagged with:
-
REST Authentication issue on FMX Windows: Error querying headers (12019): The handle is in the wrong state for the requested operation
ertank replied to Alex40's topic in FMX
I would consider switching to an HTTP client of your choice and stop using TREST components. -
I would suggest to use SQLite on a mobile device rather than FirebirdSQL if you do really need to save some data on the device itself. Is there any particular reason you want to use FirebirdSQL?