Home > comp > gb.db.mysql > _database > add 
  [3.0]
 fr de es it nl pl pt pt_BR mk sq ca ar fa vi ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration  
Documentation
History
 
Add
Creates a database

Database: Is the database name.
Charset: Is the charset to use.
Collation: Is the collation to use.

If Charset and Collation are not provided, then the default ones are used.

Examples

Dim hCon As New Connection

With hCon
  .Type = "mysql"
  .Port = "3306"
  .Host = "localhost"
  .User = "root"
  .Password = "mypass"
  .Name = "Gambas"
  .Open()
End With

hCon.MySQL.DataBase.Add("Gambas", hCon.MySQL.Charset, hCon.MySQL.Collation)

MySQL statement: CREATE DATABASE `Gambas` DEFAULT CHARACTER SET = utf8 DEFAULT COLLATE utf8_general_ci