[GB.DB.MYSQL]

* BUG: The functions Collations, Charsets, Users, Databases work
  correctly now.

git-svn-id: svn://localhost/gambas/trunk@1516 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
David Villalobos Cambronero 2008-08-22 20:22:50 +00:00
parent 1457821bcb
commit 7877114d0e

View file

@ -170,6 +170,7 @@ End
Private Function Collations_Read() As String[] Private Function Collations_Read() As String[]
$asCollations.Clear()
modMain.$hResult = modMain.$Connection.Exec("SELECT `COLLATION_NAME` FROM `information_schema`.`COLLATIONS` ORDER BY `COLLATION_NAME`") modMain.$hResult = modMain.$Connection.Exec("SELECT `COLLATION_NAME` FROM `information_schema`.`COLLATIONS` ORDER BY `COLLATION_NAME`")
For Each modMain.$hResult For Each modMain.$hResult
$asCollations.Add(modMain.$hResult["COLLATION_NAME"]) $asCollations.Add(modMain.$hResult["COLLATION_NAME"])
@ -181,6 +182,7 @@ End
Private Function Engines_Read() As String[] Private Function Engines_Read() As String[]
$asEngines.Clear()
modMain.$hResult = modMain.$Connection.Exec("SHOW ENGINES") modMain.$hResult = modMain.$Connection.Exec("SHOW ENGINES")
For Each modMain.$hResult For Each modMain.$hResult
$asEngines.Add(modMain.$hResult["Engine"]) $asEngines.Add(modMain.$hResult["Engine"])
@ -192,6 +194,7 @@ End
Private Function Charsets_Read() As String[] Private Function Charsets_Read() As String[]
$asCharsets.Clear()
modMain.$hResult = modMain.$Connection.Exec("SELECT DISTINCT `CHARACTER_SET_NAME` FROM `information_schema`.`COLLATIONS` ORDER BY `CHARACTER_SET_NAME`") modMain.$hResult = modMain.$Connection.Exec("SELECT DISTINCT `CHARACTER_SET_NAME` FROM `information_schema`.`COLLATIONS` ORDER BY `CHARACTER_SET_NAME`")
For Each modMain.$hResult For Each modMain.$hResult
$asCharsets.Add(modMain.$hResult["CHARACTER_SET_NAME"]) $asCharsets.Add(modMain.$hResult["CHARACTER_SET_NAME"])
@ -210,6 +213,7 @@ End
Private Function Databases_Read() As String[] Private Function Databases_Read() As String[]
$asDatabases.Clear()
modMain.$hResult = modMain.$Connection.Exec("SHOW DATABASES") modMain.$hResult = modMain.$Connection.Exec("SHOW DATABASES")
For Each modMain.$hResult For Each modMain.$hResult
$asDatabases.Add(modMain.$hResult["Database"]) $asDatabases.Add(modMain.$hResult["Database"])
@ -221,6 +225,7 @@ End
Private Function Users_Read() As String[] Private Function Users_Read() As String[]
$asUsers.Clear()
modMain.$hResult = modMain.$Connection.Exec("SELECT DISTINCT `User` FROM `mysql`.`user`") modMain.$hResult = modMain.$Connection.Exec("SELECT DISTINCT `User` FROM `mysql`.`user`")
For Each modMain.$hResult For Each modMain.$hResult
$asUsers.Add(modMain.$hResult["User"]) $asUsers.Add(modMain.$hResult["User"])