My Name is Motaz Abdel Azeem.
I’m the author of start programming using Object pascal book, Turbo Bird database Admin tool, and FreeSpider web development framework.
I live in Sudan
My Name is Motaz Abdel Azeem.
I’m the author of start programming using Object pascal book, Turbo Bird database Admin tool, and FreeSpider web development framework.
I live in Sudan
hi dear
thank you for your useful blog,
i am newbie in Lazarus programming and have good working experience in Delphi programming, i am going to switch to Lazarus and MySQL database and have a few question.
witch is better for database?(MySQL-FireBird)
how can i create 64 bit binary project with Lazarus?
i think if you post a tutorial about connecting Lazarus to MySQL will cause have better blog.
i recently post a question in this URL and i am confused!!
http://www.lazarus.freepascal.org/index.php/topic,19010.0.html
help me.
thank you.
MySQL versions needs different libraries in Lazarus, and needs additional third party package to deal with in Lazarus, but in FireBird native Lazarus components can work just fine with all available versions of FireBird
FireBird is small and have not any things in against MySQL…
Yes, it is more lighter than MySQL, but more robust, more stable and easy to install. I’ve used it for about 10 years since it was Interbase, without any crash.
If you like MySQL and you have success with it using Lazarus why not to talk about it in a blog, a lot of people are using MySQL.
cool idea.
we have a topic in Persian and it is only persian source in the internet.!!!
http://forum.ubuntu.ir/index.php/topic,35247.0.html
but i am newbie ,love Lazarus and Mysql ,if possible i am going to switch
FireBird (in the future).
thank you for response.
i love understand to 64 bit binary project,can you create a post about it.?
rigards
sorry
Best regards
sorry, I forget to talk about 64 bit.
Actually I have no experience about cross-compliation in Lazarus, which means producing 64 bit binaries from 32 bit system and vice versa, and producing executables for other platforms from one platform. May be you should use Code Typhon for cross-compliation: http://www.pilotlogic.com/sitejoom/index.php/codetyphon
I have a 64 bit Linux installed in external hard disk, and I have 64 bit Lazarus version on that hard disk, I used it to produce 64 bit versions of my Lazarus applications. My primary development machine contains 32 bit of Linux.
thank you for Code Typhon
Actually i read http://code.sd/turbobird/ and i would like to know with which version of Lazarus was created that be able ran in other platform(32-64 bit)?! or you used Code Typhon?
or recompile code project in each Lazarus version?
and :
at https://freepascalanswers.wordpress.com/2012/02/17/execute-commands/ ,when used Lazarus 1.0.2 ,i could not see UsePiples property in TProcess?it changes?
thank you
As I said before, I have two versions of Lazarus installed, 32 bit version in 32 bit Ubuntu, and another one 64 bit in 64 bit Linux mint in external Hard disk.
For TProcess, see Options/poUsePipes
hi there,
if this is correct? (about 64 and 32 bit)
http://sheepdogguides.com/lut/lt0N64-32.htm
Best Regards
Yes, that’s right.
I’ve written a document about 32bit/64bit, can you read Arabic?
https://abueyas.wordpress.com/2012/03/19/32bitan64bit/
thanks a lot.
i can’t read Arabic. I wish it was English.
if possible?
I thought that you are from Iran, so that I guessed you could read Arabic.
See to this google translation, but it is not 100% perfect:
http://translate.google.com/translate?sl=ar&tl=en&u=http%3A%2F%2Fabueyas.wordpress.com%2F2012%2F03%2F19%2F32bitan64bit%2F
hi أبو إياس
thank you for your previous post,because I am not sure that Google translator have exact translation I’m going to that introduce your Arabic article to my Khuzestan Arabian friends.
so I have win 64 bit and installed Lazarus 32 bit,my application could ran in 32-64 bit machine?
thank you
Yes 32 bit Lazarus windows application could run in both Windows versions 32 and 64
What is Khuzestan?
hi Motaz Abdel Azeem
Nice to Meet You and very happy for find your blog and lazarus codes Interestingly
I am from Iran and i can speak english a little 🙂 .
I’ve been programming with Delphi 7 and Microsoft Sql Server 2000 in the past.
I migrated to GNU/Linux a few years ago and used Ubuntu/Kubuntu and Lazarus 1.04 and Mysql for developing database application in my project .
http://forum.ubuntu.ir/index.php/topic,35247.0.html
this topic i trying learn to my Friends use lazarus and working with database.
Recently i trying create a Download manager ( for GNU/Linux and Windows).
i use synapse and your code in blog Helped me so much and Thank you very much.
but in your code this topic :
https://freepascalanswers.wordpress.com/2012/06/15/synapas-http-thread
in my system not worked and application not running .
Can you please help me؟
Hello Amer and welcome.
what is the error do you get in HTTP thread download?
thank you أبو إياس
about khozestan
http://www.irantour.org/Iran/province/Khozestan.html
@delphi887
you seem to be friend 🙂
Your language is very close to Arabic, why don’t you learn Arabic? it is the language of Quran, can you read Quran, are you Muslim?
hi Motaz again 🙂
in start i trying create a simple Downloader from web server.
i get file Successfully from INTERNET in the first step.
one problem :
when downloading a file my application locked and when download finished my application is free.
According to your post for use thread I understand that should use thread in my project.
when i running my program exit very fast or nix run.(Of course when i remove line {$IFDEF UNIX}
cthreads, cmem,
{$ENDIF}
my project running but not work completely.
my code :
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
{$IFDEF UNIX}
cthreads, cmem,
{$ENDIF}
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Buttons,
StdCtrls,httpsend,LCLProc, ExtCtrls, ComCtrls,blcksock,typinfo;
type
{ THTTPDownload }
THTTPDownload = class(TThread)
private
fURL: string;
fFileName: string;
public
constructor Create(URL, FileName: string);
procedure Execute; override;
end;
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Label1: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Memo1: TMemo;
ProgressBar1: TProgressBar;
Timer1: TTimer;
procedure Button1Click(Sender: TObject);
procedure OnStatus(Sender: TObject;Reason:THookSocketReason;const Value:string);
procedure DownloadTerminiated(Sender: TObject);
private
http:THTTPSend;
testaddr:string;
TotalBytes,CurrentBytes:Integer;
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{ THTTPDownload }
constructor THTTPDownload.Create(URL, FileName: string);
begin
inherited Create(True);
fURL:= URL;
fFileName:= FileName;
end;
procedure THTTPDownload.Execute;
var httpClient: THTTPSend;
begin
httpClient:= THTTPSend.Create;
if httpClient.HTTPMethod(‘GET’, fURL) then
httpClient.Document.SaveToFile(fFileName);
Form1.Memo1.Lines.Add(fFileName + ‘, has been downloaded’);
httpClient.Free;
end;
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
var
httpClient: THTTPSend;
download: THTTPDownload;
begin
ProgressBar1.Position:=0;
CurrentBytes:=0;
TotalBytes:=0;
Button1.Enabled:=False;
download:= THTTPDownload.Create(Edit1.Text,’download.jpg’);
download.OnTerminate:= @DownloadTerminiated;
httpClient.Sock.OnStatus:=@OnStatus;
download.Resume;
memo1.Lines.Append(‘Download started’);
end;
procedure TForm1.OnStatus(Sender: TObject;Reason:THookSocketReason;const Value: string);
begin
if (Reason=HR_ReadCount) then
begin
CurrentBytes:=strtoint(Value)+CurrentBytes;
Label10.Caption:=inttostr(CurrentBytes);
Memo1.Lines.Append(inttostr(http.DownloadSize));
ProgressBar1.Position:=round(100*(CurrentBytes / TotalBytes));
end;
Memo1.Lines.Append(getEnumName(typeinfo(THookSocketReason), integer(Reason)) + ‘ ‘ + Value);
Form1.Update;
end;
procedure TForm1.DownloadTerminiated(Sender: TObject);
begin
Memo1.Lines.Append(‘Thread finished’);
Button1.Enabled:=True;
end;
end.
hi ebi
nice to meet you 🙂
yes of course i Muslim and reading Quran and can speak arabic little
but Everywhere speaking english in INTERNET and my English Better than Arabic.
Could you please send the complete application to me at motaz at code.sd to test it
but you need Arabic more than English to understand Quran and Ahadeeth. Quran is Muslim life
You are right my friend. i understand Quran and Ahadeeth partly and Most of our religious books Including Arabic And Persian But overall You are right and should my Arabic better than English.
OK i sending it Soon for you
hi
I found this URL:(Suggested additions to SQLdb Tutorial 1)
http://www.lazarus.freepascal.org/index.php/topic,19236.0.html
Hi Motaz Abdel Azeem,
Thank you for writing Start Programming using Object Pascal.
I’m new into programming and this book is helping me a lot
with exploring Pascal.