new_x
Members-
Content Count
25 -
Joined
-
Last visited
Everything posted by new_x
-
Hi I am using Delphi 11 Community Version, designed a DB in PostGreSQL and created a table, this table has a QuizAnswers" columns of type text, Created a Delphi Application having a memo into which user writes his own answer to the Quiz questions, I want to store user answer (which is entered into the memo) into the column "QuizAnswers" , The answers are in Turkish and may have non-standard characters like "ğ", "ç", "ü", "ı", "o".., I am using FireDAC FDCOnnection, FDPhysPgDriverLink, FDQuery and the final result is that these non-standard characters are not stored in their original form, instead "ğ" is stored as "g", "ç" is stored as "c" , "ö" is stored as "o" so on. I used the pgAdmin4 to store the same string consisting these Unicode Characters into the same column, all characters are stored and displayed correctly. Regards,
-
When I dumped the data using pgAdmin4 it is correctly stored and when I used select statement in Delphi to get the data from table, it successfully gets the data correctly.
-
To check for DB "Monitor", I used the following SQL statement, SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname = 'Monitor'; Result is; UTF8
-
It is seemed to be something from FireDAC, since the same data can be inserted correctly within pgAdmin4 by using SQL insert statement. Anyway I will use TSQLMonitor. Thanks your suggestion
-
I used the following query from pgAdmin4 SHOW SERVER_ENCODING; The result is; "UTF8"
-
I use parameters, thank you
-
Although DB encoding is UTF8, the characters are not stored correctly from Delphi application. But If I insert the data from pgAdmin4 they are correctly stored. So the DB Encoding is UTF8
-
There is no option in TFDConnection character set for "ISO-8859-9 or Windows-1254"
-
It is UTF 8
-
I am trying to learn to write a Delphi REST Web Service program (both the server and the client side). Currently my platform is Delphi 11 Community Edition supporting Internet Direct (Indy) 10.6.20. I searched through the Internet have not found sample codes or explanations. All I found is some videos using DataSnap project but In delphi 11 I could not Find File->New->Other->Data Snap. The only option is “Soap Server Application”. If my current version of Delphi does not support REST, Could you then provide SOAP based (server and client) source code and explanation. Since I am newbie, could anyone share source code and explanations. Thanks in advance
-
Thank you for kind reply. Just to explain further. In fact I am required to develop a web service to put data into learning platform Moodle. The data (student ID, number etc.) should be read in GUI (edit boxes) or from a postgresql db and must be inserted into Moodle platform. I will look into DMVCFramework . thank you
-
Hi all, I planned to use AES encryption in a project. I searched and found that there are some packages available as third party available via GetIt. (No native support in Delphi for encryption/decryption). I returned to Delphi after several years (The last version I used was D7). My question is "Is every package listed in GetIt safe to use", the second question is "is there any package that you suggest" thank you in advance.
-
Hi all I inserted the following call to the dpr file of the application to prevent the multiple instances. But did not succeed. function isOneInstance(): Boolean; Var Handle: THandle; ErrCode: DWORD; Begin Result:= False; Handle:= 0; try Handle:= CreateMutex(nil, True, 'Global\_AFB2FB05-5FA5-4C9E-9633-2353418AFF7E-HGaytt19'); if(Handle= 0) then exit(); if GetLastError() = ERROR_ALREADY_EXISTS then begin exit(); end; Result:= True; finally if(Handle<>0) then begin ReleaseMutex(Handle); CloseHandle(Handle); end; Handle:= 0; end; End; begin if(isOneInstance()) then begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.Run; end else begin Application.MessageBox('Already Running', 'WARNING', MB_OK); Application.Terminate(); end; end. Best Regards,
-
I have been trying to build a DB program by using sqlite. I downloaded ‘sqlite-dll-win64-x64-3430200.zip’ from sqlite home page, this is the current sqlite db implementation for windows 64 bit. This zip file just contains a dll and def file. I also downloaded the 32 bit tools file of the sqlite db (sqlite-tools-win32-x86-3430200.zip) . from this zip file I use “sqlite3.exe” (which is 32 bit I think). I copied the sqlite dll file into my Delphi app folder. Then to create a db file, I used following command in command prompt; sqlite3.exe sample.db then I found the following VCL code obtained from embarcaderro site; In the design time the SQLConnection1’s driver property is set to ‘sqlite’ procedure TForm1.Button1Click(Sender: TObject); begin SQLConnection1.Params.Add(‘Database=sample.db’); try // Establish the connection. SQLConnection1.Connected := true; executeButton.Enabled := true; outputMemo.Text := ‘Connection established!’; except on E: EDatabaseError do ShowMessage(‘Exception raised with message’ + E.Message); end; end; If I compile the VCL app as 64 bit Windows Application, and run it and press the button1 then the code waits a little bit then the whole app closes. (Without giving any error message) But if compile the Delphi application as Win32 application everything goes as expected without any error. Connection is established successfully. Any idea, Best Regards,
-
Hi Peter, That is very nice to contact a person from Team-B, regards, and thank you for your comment.
-
Thank you Lajos, by the way for the second part of my question ("are all the codes/packages listed in GetIt safe to use") do you have any idea? Regards
-
Thanks all of you for your comments.
-
I am using FireDAC to handle a simple DB Program, I am using TFDConnection, TFDQuery and TDataSource and TDBGrid components to handle DB operations. It is a simple visitor recording DB application, visitor table is created as; 1- create table visitors (name nvarchar(30) not null COLLATE NOCASE, lastname nvarchar(30) not null COLLATE NOCASE, enterance_time integer not null, exit_time integer not null); 2- for the time record insertion into the table I used, DateTimeToUnix(Now()) values for the enterance_time and exit_time fields. But I do not know how to show normal date time string (like mm/dd/yyyy hh:mm:nn) in the DBGrid correponding fields when I want to list the records of the table to show to the user. So if I restate the problem "how can we display the date and time values in "mm/dd/yyyy format if the datetime value is stored in the Sqlite db as INTEGER" Regards,
-
As I stated above I am novice at using Delphi, At which point in code, I should call entrance_time.AsDateTime?
-
I am novice at using Delphi. How to assign that event? I am using FDConnection, FDQuery, DataSource and DBGrid, when querying the DB data, I am constructing SQL query statements (select * from ...) based on user input, then executing that SQL statements with FDQuery showing the result in the DBGrid. Which component does have that event? Thanks
-
I thought that I should store both enterance_time, exit_time values as Integer. Whenever a new record comes, I want to check if that new record's date time values falls into already stored records' date time values. This way it should be simple to compare date time values in Delphi am I right?
-
Thank you for your replies. I decided to use FireDAC components and now there is no error. Best regards,
-
My Delphi version Delphi 11 CE, I tried to put breakpoints on the code. Just clicked on the blue dots on the left. But the Delphi behaved like there were no breakpoints when run. I put the breakpoints on the lines that the code had to call so I expected Delphi to stop at that breakpoints. But did not work. I also used Ctrl+D (formatter) but it did not make any change. Regards
-
I used the FireDAC and everything seemed to be okay now. Thanks for your kind replies. By the way there was not any logged event in windows event viewer (Windows -> Application logs) Best Regards,
-
Prevent Multiple Instance from running at the same time
new_x replied to new_x's topic in Windows API
I was shocked how I did that mistake. Thanks a million for your reply.