William23668
-
Content Count
121 -
Joined
-
Last visited
Posts posted by William23668
-
-
For example like C# WebDriver ?
-
36 minutes ago, PeterBelow said:Mine shows 28.0.46481.1287.
will try to reinstall again, thanks
solved...
-
4 hours ago, Stano said:Last patch - 4 oct. November nothing.
Thanks this is the last version 28.0.46141.0937 ?
-
Hi,
What the Delphi 11 version number after november patch ?
-
36 minutes ago, KenR said:Do you have the CreateDatabase param set. e.g.
FDConnection1.Params.Values['CreateDatabase']:=BoolToStr(not FileExists(FDConnection1.Params.Database),True);
wow this solved the problem, I never read about this parameter before. many thanks
-
18 minutes ago, limelect said:1.use FDConnection1
2.FDConnection1BeforeConnect >>>>FDConnection1.Params.Values['Database'] := 'Applications.db';
3. FDConnection1AfterConnect>>>>
FDConnection1.ExecSQL('CREATE TABLE IF NOT EXISTS Files (SectionsId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,MainDirectory TEXT NULL, Files TEXT NULL)');
FilesFDTable.TableName := 'Files';
FilesFDTable.Active := True;
Now you can use table or sqlI dont understand !! the code display error on connect so it does not connect or create a file.
-
Hi
I am using this code to create the database bute I get error on connect :
var MyDBFile: string; begin MyDBFile := 'C:\db5.sqlite3'; if FileExists(MyDBFile) then DeleteFile(MyDBFile); FDConnection1.Params.Values['Database'] := MyDBFile; FDConnection1.Params.Values['DriverID'] := 'SQLite'; //Connection.Params.Values['Encrypt'] := 'aes-128'; //Connection.Params.Values['Password'] := '1234'; FDConnection1.Connected := True; --------------------------- [FireDAC][Phys][SQLite] ERROR: unable to open database file. ---------------------------
-
7 minutes ago, David Heffernan said:Also, this isn't how to display binary in a hex editor.
No it was just to practice.
-
4 minutes ago, David Heffernan said:Should be #0 rather than '#0'
love you. many thanks
-
I test it with this line
fstr := 'MZ'#$0090#0#3#0#0#0#4#0#0#0'ÿÿ'#0#0'¸'#0#0#0#0#0#0#0''; fstr := stringreplace(fstr,'#0','0',[rfReplaceAll, rfIgnoreCase]);
output is (copied from the watch window)
'MZ'#$0090#0#3#0#0#0#4#0#0#0'ÿÿ'#0#0'¸'#0#0#0#0#0#0#0
-
I have string like this
84@fgl#000^2#0#0 94j@f#0
And I tried to replace all '#0' with '0' like this
result := stringreplace(OriginalStr, '#0', '0',[rfReplaceAll, rfIgnoreCase]);
But this did not replace all the '#0' , how I should use this ?
-
Ok learning now about encoding.
-
11 hours ago, David Heffernan said:You aren't going to be able to display the contents of a binary file in a rich edit control like this. If you want a hex editor, then display each byte as hex.
Just for learning why the app stop responding ? if I used richedit LoadFromStream it load fine.
-
@Remy Lebeau
Many thanks I learned many things now. I just need to read byte by byte for processing later.
-
Hi
I was able to read the file byte by byte but the app hangup/not responding I dont know why ? Here is the code:
var AFile: TFileStream; BR: TBinaryReader; MyByteArray: TBytes; mstr: String; i: integer; begin AFile := TFileStream.Create(filename, fmOpenRead); BR := TBinaryReader.Create(AFile, TEncoding.Unicode, false); try SetLength(MyByteArray, AFile.Size); // Get the whole file contents into the byte array MyByteArray := BR.ReadBytes(AFile.Size); for i := low(MyByteArray) to High(MyByteArray) do begin SetString(mstr, PAnsiChar(@MyByteArray[i]), Length(MyByteArray)); RichEdit1.Text := RichEdit1.Text + mstr; end; BR.Close; finally BR.Free; AFile.Free; end; end;
-
Just now, Lajos Juhász said:It guess with the edit the source was removed.
Appreciate your help friend.
-
3 minutes ago, Lajos Juhász said:You can take a look at http://delphiforfun.org/programs/utilities/hexview.htm.
thanks alot. I can not open this url, does it work with you ?
-
Thanks alot guys
-
2 minutes ago, David Heffernan said:You already read every byte!!
The real problem here is that you can't explain what you are trying to do. What do you mean about getting every address? An exe file isn't a list of addresses.
for example hex editor it display address and value ?
-
Long time I did not use Delphi. Any article to read about reading exe files ? I need to get each byte value and address.
-
I tried now to use this code:
SetLength(MyByteArray, AFile.Size); MyByteArray := BR.ReadBytes(AFile.Size); memo1.lines.add(TEncoding.Unicode.GetString(MyByteArray));
but I get something like this 婍 from exe file.
-
1 minute ago, Lajos Juhász said:In that case load it directly to the field you're going to use to store it in the database.
by coding.
-
6 minutes ago, David Heffernan said:The size of the file is AFile.Size. You read the entire file into a byte array, but then go at the same stream with a binary reader. There are so many mistakes here. Do you want to read it into a byte array and covert to string. Or do you want to read it as binary.
read it as binary. I will want to store it into sqlite database later.
-
I want to read the file bytes and address and display in a memo
How to install Delphi 4 Python ? ImportError: DLL load failed while importing DelphiVCL: The specified module could not be found
in VCL
Posted · Edited by William23668
I tried to follow the steps as per embarcadero tutorial like that:
What is the problem ?