# I cannot get tables names and columns names from database

I am working with database using OpenSQLConnection-JDBC. I am able to fetch the data perfectly from the tables but I cannot get nor the names of the tables (using SQLTableNames) neither the column names (using SQLColumnNames). I tried also to work with the help examples; but I got same problem.

what could be the reason?

conn = OpenSQLConnection[
JDBC["MySQL(Connector/J)",
"IP/databasename"],

eventsdata = SQLSelect[
conn, "tablename",
SQLColumn["columnname"] == somevalue]


where: IP= Ip address of the database, databasename=database name that I am connecting to, tablename=table name which I have it before, columnname=columns names of the table that I have it before, somevalue=value so that I can fetch some of the data.

-
What command are you using to fetch the data? Can you show us the code that works? – mfvonh Jun 25 '14 at 4:22
@mfvonh I have add part of the code that works. – Algohi Jun 25 '14 at 4:50
What output do you get when you try these: SQLTables[conn], SQLTableNames[conn], SQLTableInformation[conn]? – mfvonh Jun 25 '14 at 4:52
I got all empty list {}. – Algohi Jun 25 '14 at 4:53
Try SQLExecute[conn, "use tablename"] and then SQLTables[conn]. (with a real table name of course) – mfvonh Jun 25 '14 at 4:58

Module[{dbConn, sqlAct, records},