Am Freitag, den 06.06.2014, 10:45 +0200 schrieb Benoît Minisini:
> Le 06/06/2014 10:32, Stefano Fraccaro a écrit :
> > I found a thread yesterday evening in a forum about that (license
> > problem). If you create a new Connection the "Type" combobox  shows the
> > "Firebird" option : I think this option should be removed if Firebird
> > isn't supported by Gambas3.
> >
> 
> Oops. Never noticed that I forgot to remove it!
> 

Salut,

Private Sub fill_cmbType()
Dim aType As String[]
Dim sType As String
  aType = GetDBDrivers()
  cmbType.Clear
  For Each sType In aType
    cmbType.Add(sType)
  Next
  ' cmbType.Add("mysql")
  ' cmbType.Add("postgresql")
  ' cmbType.Add("sqlite")
  ' cmbType.Add("sqlite2")
  ' cmbType.Add("sqlite3")
  ' cmbType.Add("odbc")
  ' cmbType.Add("firebird")
End

Public Function GetDBDrivers() As String[]
Dim xComp As String[]
Dim xCompHelper As String[]
Dim nI As Integer
    xComp = Dir(Component.Path, "gb.db.*.so")
    xComp.Sort() ' (gb.Descent)
    For nI = 0 To xComp.Length - 1
      xCompHelper = Split(xComp[nI], ".")
      xComp[nI] = xCompHelper[2]
    Next
    Return xComp
End

Like that I take care of existing db-drivers on the box.

-- 
Amicalement
Charlie


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to