Hi team!
In my project i Conect Xojo to my SQL Database with this code. Everything goes ok, But I want to say it, If “Facturacion” database doesn’t exist then create it and use it and set names to UTF8:
’ Charging MySQL database
app.mdb = New MySQLCommunityServer
app.mDb.Host = “localhost”
app.mDb.UserName = “root”
app.mDb.Password = “mypassword”
//If mySQL connects successfully then.
If app.mDb.Connect Then
//Use “Facturacin” database
app.mDb.SQLExecute("use facturacion")
//Set UTF8 type characters
app.mDb.SQLExecute ("SET NAMES 'utf8'")
if app.mDb.Error then
//If “Facturacion” database doesn’t exist,then create it
app.mDb.SQLExecute(“CREATE DATABASE facturacion”)
app.mDb.SQLExecute(“use facturacion”)
//Set UTF8 type characters
app.mDb.SQLExecute (“SET NAMES ‘utf8’”)
end
end
But It show me a Messagebox: “No table Seelected”
Any Suggestions?