Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-01

Help!!

17 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys
to Malvin
Malvin wrote
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?

There are database tutorials on the Free Pascal Wiki site.

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net
Malvin
to Graeme Geldenhuys

Thanks, I will try checking that site

Graeme Geldenhuys-2 [via Free Pascal - General] wrote 31 lines
On 3 January 2012 13:04, Malvin <[hidden email]<http://user/SendEmail.jtp?type=node&node=5116688&i=0>> wrote: > 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? There are database tutorials on the Free Pascal Wiki site. -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net _______________________________________________ fpc-pascal maillist - [hidden email]<http://user/SendEmail.jtp?type=node&node=5116688&i=1> http://lists.freepascal.org/mailman/listinfo/fpc-pascal ------------------------------ If you reply to this email, your message will be added to the discussion below: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5116688.html To unsubscribe from Help!!, click here<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5116673&code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==> . NAML<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5118593.html Sent from the Free Pascal - General mailing list .
Malvin
to Graeme Geldenhuys: 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
Thanks, I will try checking that site On Tue, Jan 3, 2012 at 6:15 PM, Graeme Geldenhuys-2 [via Free Pascal - General] wrote: > On 3 January 2012 13:04, Malvin <[hidden email]<http://user/SendEmail.jtp?type=node&node=5116688&i=0>> > wrote: > > 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? > > There are database tutorials on the Free Pascal Wiki site. > > > -- > Regards, > - Graeme - > > > _______________________________________________ > fpGUI - a cross-platform Free Pascal GUI toolkit > http://fpgui.sourceforge.net > _______________________________________________ > fpc-pascal maillist - [hidden email]<http://user/SendEmail.jtp?type=node&node=5116688&i=1> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > > ------------------------------ > If you reply to this email, your message will be added to the > discussion below: > > http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5116688.html > To unsubscribe from Help!!, click here<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5116673&code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==> > . > NAML<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5119257.html Sent from the Free Pascal - General mailing list .
Graeme Geldenhuys
to Malvin
Malvin wrote
Is 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.

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net
Malvin
to Graeme Geldenhuys

thanks, i'll try using it

Graeme Geldenhuys-2 [via Free Pascal - General] wrote 47 lines
On 4 January 2012 12:33, Malvin wrote: > Is 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. -- Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ If you reply to this email, your message will be added to the discussion below: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5120203.html To unsubscribe from Help!!, visit http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5116673&code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5131512.html Sent from the Free Pascal - General mailing list .
Malvin
to Graeme Geldenhuys: 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
thanks, i'll try using it On 1/4/12, Graeme Geldenhuys-2 [via Free Pascal - General] wrote: > > > On 4 January 2012 12:33, Malvin wrote: >> Is 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. > > -- > Regards, > - Graeme - > > > _______________________________________________ > fpGUI - a cross-platform Free Pascal GUI toolkit > http://fpgui.sourceforge.net > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > > _______________________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5120203.html > > To unsubscribe from Help!!, visit > http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5116673&code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5146427.html Sent from the Free Pascal - General mailing list .
Mattias Gaertner
to Malvin
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

Malvin
to Mattias Gaertner

thanks for your information

Mattias Gaertner [via Free Pascal - General] wrote 33 lines
On Sun, 15 Jan 2012 05:58:21 -0800 (PST) Malvin wrote: > 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 _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ If you reply to this email, your message will be added to the discussion below: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5146438.html To unsubscribe from Help!!, visit http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5116673&code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5147410.html Sent from the Free Pascal - General mailing list .
Andreas Schneider
to Mattias Gaertner: 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
On Sun, 15 Jan 2012 05:58:21 -0800 (PST) Malvin wrote: > 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.

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. :-))

Best Regards, Andreas
Mattias Gaertner
to Andreas Schneider

Andreas Schneider hat am 17. Januar 2012 um 11:23 geschrieben:

Show quoted text 5 lines
On Sunday, January 15, 2012, at 15:04 Mattias Gaertner wrote: > On Sun, 15 Jan 2012 05:58:21 -0800 (PST) > Malvin wrote: >> 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?

Show quoted text 12 lines
>> 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. 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. :-))

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

Felipe Monteiro de Carvalho
to Mattias Gaertner

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
Andreas Schneider
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
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.

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.

Best Regards, Andreas
Mattias Gaertner
to Andreas Schneider

Andreas Schneider hat am 17. Januar 2012 um 16:08 geschrieben:

Show quoted text 10 lines
On Tuesday, January 17, 2012, at 13:15 Felipe Monteiro de Carvalho wrote: > 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. 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

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

Malvin
to Andreas Schneider

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
On Tuesday, January 17, 2012, at 16:24 Mattias Gaertner wrote: Andreas Schneider <[hidden email]<http://user/SendEmail.jtp?type=node&node=5154137&i=0>> hat am 17. Januar 2012 um 16:08 geschrieben: > > 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 Instead of Application.CreateForm create the form directly. For example: LoginForm:=TLoginForm.Create(nil); while LoginForm.ShowModalmrOk do ; LoginForm.Free; ... Application.CreateForm(Form1); Interesting idea ... that didn't occur to me yet. So I guess my use case IS covered already. Thanks :-) *-- Best Regards, Andreas _______________________________________________ fpc-pascal maillist - [hidden email]<http://user/SendEmail.jtp?type=node&node=5154137&i=1> http://lists.freepascal.org/mailman/listinfo/fpc-pascal ------------------------------ If you reply to this email, your message will be added to the discussion below: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5154137.html To unsubscribe from Help!!, click here<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5116673&code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==> . NAML<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> *
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5160853.html Sent from the Free Pascal - General mailing list .
Malvin
to Graeme Geldenhuys: Under Windows, that should be all that you need. Under Linux you would normally need to…

---------- Forwarded message ----------

Earlier message 64 lines
From: Malvin Viriya Date: Fri, Jan 20, 2012 at 11:04 PM Subject: Re: Help!! To: "Andreas Schneider-7 [via Free Pascal - General]" < > 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? On Wed, Jan 18, 2012 at 3:25 PM, Andreas Schneider-7 [via Free Pascal - General] wrote: > On Tuesday, January 17, 2012, at 16:24 Mattias Gaertner wrote: > > > > Andreas Schneider <[hidden email]<http://user/SendEmail.jtp?type=node&node=5154137&i=0>> > hat am 17. Januar 2012 um 16:08 geschrieben: > > > > 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 > > Instead of Application.CreateForm create the form directly. For example: > > LoginForm:=TLoginForm.Create(nil); > while LoginForm.ShowModalmrOk do ; > LoginForm.Free; > ... > Application.CreateForm(Form1); > > > > > > Interesting idea ... that didn't occur to me yet. So I guess my use case > IS covered already. Thanks :-) > > *-- > Best Regards, > Andreas > _______________________________________________ > fpc-pascal maillist - [hidden email]<http://user/SendEmail.jtp?type=node&node=5154137&i=1> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5154137.html > To unsubscribe from Help!!, click here<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5116673&code=bWFsdmludm52QGdtYWlsLmNvbXw1MTE2NjczfDEyNTA4MzUwNA==> > . > NAML<http://free-pascal-general.1045716.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespace&breadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > * -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Help-tp5116673p5453907.html Sent from the Free Pascal - General mailing list .