[Gambas-user] Newbie problem connecting to MySQL
Mike Brett
serif at ...1870...
Thu Mar 13 09:31:50 CET 2008
I'm literally just starting with Gambas and would appreciate guidance
please.
Context : Latest compiled version (1.0.19), yum'd onto Fedora 8
Aim: test project to create a connection to a localhost MySQL server
Code as follows:
MODMain module (this is set as start up class)....
PUBLIC $Con AS NEW Connection
PUBLIC PROCEDURE Connect()
$Con.Close()
$Con.Type = "mysql"
$Con.Host = "localhost"
$Con.Login = "blabla"
$Con.Port = "3306"
$Con.Name = "tradewaste"
$Con.Password = "whatever"
$Con.Open()
END
Module Main ......
PUBLIC SUB Main()
Connect()
FRMStart.Visible = True
END
FRMStart exists but has no controls on it yet.
When I run this, I get "Unknown Identifier: Connect at line 4 in
Main.module"
Components gb, gb.db and gb.qt are used in the project. I expected to
have to include a mysql component as well, but nothing suitable is
offered for inclusion in the component list. I'm sure this is something
*very* simple!
Appreciate your time. Thanks.
- Mike -
More information about the User
mailing list