Right now i've been trying to build a mysql server using pascal, but i don't know where to begin. Can anyone help me?
Mailing lists / fpc-pascal / 2012-01
Help!!
17 messages · 5 people · –
- MMalvin 8
- AAndreas Schneider 3
- MMattias Gaertner 3
- GGraeme Geldenhuys 2
- FFelipe Monteiro de Carvalho 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Malvin wroteRight now i've been trying to build a mysql server using pascal, but i don't know where to begin. Can anyone help me?
There are database tutorials on the Free Pascal Wiki site.
Thanks, I will try checking that site
Graeme Geldenhuys-2 [via Free Pascal - General] wrote 31 lines
There are database tutorials on the Free Pascal Wiki site. - Graeme -…
Is there any other components need installing so that it will connect properly other than libmysql.dll, and also i've heard of TMySQL, what is that? and is there any other alternatives?
Malvin Viriya wrote 39 lines
Malvin wroteIs there any other components need installing so that it will connect properly other than libmysql.dll,
Under Windows, that should be all that you need. Under Linux you would normally need to install the xxx-dev package where xxx is the database library (mysql, firebird, postgresql etc).
and also i've heard of TMySQL, what is that? and is there any other alternatives?
I don't use MySQL at all, so can't really comment on that. I solely use Firebird for my commercial work. I also don't use database components directly, instead I use tiOPF - an object persistence framework which supports multiple database backends. This allows me to concentrate on business objects and business logic, and the tiOPF framework takes care of the loading, saving and transaction support for me. I primarily use the SqlDB database backend (included with FPC) via tiOPF, but can easily change to FBLib via a single compiler directive change and a recompile too.
tiOPF is also documented on the FPC wiki. Or visit http://www.tiopf.com for more details if you want.
thanks, i'll try using it
Graeme Geldenhuys-2 [via Free Pascal - General] wrote 47 lines
Under Windows, that should be all that you need. Under Linux you would normally need to…
So far i've managed to do the program quite well, and I was wondering, can i close the main form (form1) whils opening form2 and not closing the app? Is there any way that I can do it?
And if i were to make a new 'ID' (on the app), is there any way that i can write that into my database? What command should i use?
Thanks in advance.
Malvin Viriya wrote 55 lines
So far i've managed to do the program quite well, and I was wondering, can i close the main form (form1) whils opening form2 and not closing the app? Is there any way that I can do it?
If you mean LCL forms: The MainForm can not be closed, but you can hide it.
And if i were to make a new 'ID' (on the app), is there any way that i can write that into my database? What command should i use?
I don't know.
Thanks in advance.
Mattias
thanks for your information
Mattias Gaertner [via Free Pascal - General] wrote 33 lines
On Sun, 15 Jan 2012 05:58:21 -0800 (PST) If you mean LCL forms: The MainForm can not be…
Mattias Gaertner wrote 9 lines
But you can trick the LCL into changing what Form is considered to be the MainForm.
Btw. is there any chance for having an official way to do this? i.e. making TApplication.MainForm a writable property? (I ask this here instead of opening a ticket because I suspect there's a good reason why this isn't available yet, which you will tell me now. :-))
Andreas Schneider hat am 17. Januar 2012 um 11:23 geschrieben:
Show quoted text 5 lines
can
>> i close the main form (form1) whils opening form2 and not closing the
app?
Show quoted text 12 lines
No one needed it yet.
The MainForm contains the default main menu and its handle is used as default handle. All widgetsets must be checked.
Mattias
If the use case is closing the main form without quitting the application, then I would prefer a property
TApplication.QuitApplicationWhenMainFormCloses or something like that.
Felipe Monteiro de Carvalho wroteIf the use case is closing the main form without quitting the application, then I would prefer a property TApplication.QuitApplicationWhenMainFormCloses or something like that.
My current use case is:
- show a login form
- when login succeeds, show a progress form (connection initialization) and close login
- on failure: go back to login
- on success: show the actual application form and close the login form
Showing the "main" form always wouldn't seem nice. Starting the application with the mainform hidden doesn't work afaik. You can hide it manually AFTER it was shown (.Hide), but Visible=False is ignored on startup. This just doesn't look nice if the main form pops up for a second to be hidden again. So I use the workflow described above, which changes the current Application.MainForm several times.
Andreas Schneider hat am 17. Januar 2012 um 16:08 geschrieben:
Show quoted text 10 lines
and close login
- on failure: go back to login - on success: show the actual application form and close the login form
Instead of Application.CreateForm create the form directly. For example:
LoginForm:=TLoginForm.Create(nil);
while LoginForm.ShowModalmrOk do ;
LoginForm.Free;
...
Application.CreateForm(Form1);Showing the "main" form always wouldn't seem nice. Starting the
application with the
mainform hidden doesn't work afaik. You can hide it manually AFTER it was
shown (.Hide),
but Visible=False is ignored on startup. This just doesn't look nice if
the main form
pops up for a second to be hidden again. So I use the workflow described
above, which
changes the current Application.MainForm several times.
Mattias
i need to make the login connection to my database via this form (in the picture), is there any way that i can do it?
Andreas Schneider-7 [via Free Pascal - General] wrote 45 lines
Under Windows, that should be all that you need. Under Linux you would normally need to…
---------- Forwarded message ----------
