Private sub GetTables(ByVal sDatabaseName As String, ByVal ListBoxObject As ListBox)
Try
Dim sSQL As String = "show tables in " & sDatabaseName
Dim oCmd As Odbc.OdbcCommand = ObjCon.CreateCommand
oCmd.CommandText = sSQL
Dim oRS As Odbc.OdbcDataReader = oCmd.ExecuteReader
Do While oRS.Read
ListBoxObject.Items.Add(oRS(0))
Loop
oRS.Close()
Catch ex As Exception
msgbox(err.description)
End Try
End Function
0 comments
Post a Comment