[Gambas-user] Problem with the EXEC[] function

Rolf Schmidt rolf.frogs at ...221...
Mon Mar 7 17:43:23 CET 2005


Hi Benoit Minisini:

> You must wait by yourself:
>
> DIM hProcess AS Process
>
> EXEC ["createdb", "-h", FHV.konfig.Key("host"), "-U",
>             FHV.konfig.Key("user"), "-E", "UNICODE",
>             FHV.konfig.Key("database")] WAIT FOR READ AS hProcess
>
> WHILE hProcess.State = hProcess.Running
>   WAIT 0.1
> WEND
>
> But this is not a clean way. A better way is to manage everything around
> the top event loop: running the first process in Form_Load, for example,
> and running the second process in Process_Kill() when the first is
> terminated.
>
> Another point: at the moment, you cannot manage completely programs that
> need to be run in a terminal (like /bin/sh, or telnet).

Many thanks for your help and your excellent work creating gambas.

I'm going to handle the database setup outside of my gambas programm - and 
wait, until you find a solution for the EXEC-problem (or the database 
interface becomes better). 
 - Even with #hDB.exec("create table table (id serial primary key,...)")
   problems arise, because postgresql gives a warning on stderr.

Regards
Rolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20050307/caf7fc00/attachment.sig>


More information about the User mailing list