[Gambas-user] how to use host property with IP address?

Olivier Coquet olivier at ...289...
Thu Nov 13 06:59:48 CET 2003


Le Jeudi 13 Novembre 2003 03:14, t4nu a écrit :
> Hi all....
> how to make a connection to mysql in other computer at
> the same local area network ?
> does anyone knows..?
>
> set host = ?
>
> thank's

PUBLIC DB AS NEW Connection	' inititiate a DB connection

DIM rResult AS Result			' rResult type of Result for storing sql query results

  DB.Type = "mysql" 			' type of sql databas
  DB.Name = "mybase"	 	' name of the base (not the table)
  DB.Login = "mylogin"		' login name as set in database autorized user
  DB.Password = "mypassword"	'password for this user
  DB.Host = "thehostIP"		' IP adress of the server
  DB.Port = "3306"			' Port number to connect, usualy 3306

DB.Open					' to open database connection

DB.Close					to close database connection


regards
Olivier





More information about the User mailing list