Hello All,
I have created a database in Mysql now i need to link that database with my xojo project
so please anyone can help me how to interface that one & also please tell how to interface particular database to a label or text field

Please ask more concrete questions.

There a dozens of methods to show data from a database. One is here: .

ok sir I will try this

If you look in C:\Program Files (x86)\Xojo\Xojo 2016r1\Example Projects\Database\MySQL there should be an example. (folder might be different on your system)

BTW: is MySQL free with Xojo now ?

MySQL is GPL, but yes Xojo supports it for MySQL Community Edition databases.

I was thinking at your Xojo licence: does it include all Data Base support (only SQLite is free) ?

You also may want to read:

At last, I found it:

and search for Database; you will found:

If your application uses the Xojo Database API to access a database server, a Database Servers License Key will also be required.

Of course, I may be wrong.

Ahha I see what you mean :wink: No MySQL wont work on the free edition, I didn’t even think of checking, doh!

and the mysql licence on the server side is all but clear. it is not completely free as we understand it
if you begin with multiuser databases, better look at the postgres plugin
you need a database licence on the xojo side, but the server side is completely free for your deploiments.

Or, if it feet your needs, you can use the free SQLite database.

Mother web site is at

More details (from Xojo web site) at:


Sorry my bad english, :frowning:

  1. create a Property
    db as MySQLCommunityServer

  2. Open your Mysql, create a method

’ How to use

if DbOpenOk() = false then
  ' acces dont word
end if
// create String to access any Recod

its very importar check if INTERNET ON
this is one of my method, create a Method named: TestInternetON as boolean

  Dim GoogleSocket As New HTTPSocket
  If GoogleSocket.Get("", 2) <> "" Then
     ' Internet ok        
      return true
       ' Internet OFF
        return false
  End If

this is one method to open Database on Internet with Mysql ( you need License key to use Mysql, not free in xojo desktop)

create method Named: DbOpenOk as Boolean

' Check if Internet ON
  if TestInternetOn() = false then
    MsgBox("Sorry, internet OFF.  Try in any moment")
    ExitSoftware = true

   dim messprog as string

    ' ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
    ' Open Mysql Database
    ' ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
    dbSistema=New MySQLCommunityServer"programafacil.cxx.xx" // if you no have Domain use:""
    dbSistema.port= 3306
    '  Conected ?
    If dbSistema.Connect = false  then
      ' No, check ErrorNumber
      if dbSistema.ErrorCode = 1045 then
        messprog= " Server pasword are changed, download a New Version"
        ExitSoftware = true

   ' its other error, show      
      messprog=  "   Error Nro: " + str(App.dbSistema.ErrorCode)+ EndOfLine
      messprog= messprog+ "   Messe: " + App.dbSistema.ErrorMessage+ EndOfLine  + EndOfLine
      ExitSoftware = true
    InfoResultado = true

return    InfoResultado