[Gambas-user] sqlite_master not accessible through ODBC?

Markus Schatten markus.schatten at ...2005...
Mon Apr 25 01:46:46 CEST 2016


Dear friends,

is it possible to access the sqlite_master table through the ODBC
driver? I connect easily to an SQLite DSN, but when I try to query the
master table I get:

Unknown table: sqlite_master

Here is what I do:

' Gambas class file

Public $con As New Connection

Public Sub _new()
  $con.type = "odbc"
  $con.Host = "sqlite_dsn"
  $con.Login = "login"
  $con.Password = "password"
  $con.Open
  DataSource1.Connection = $con

  Try DataSource1.Table = "sqlite_master"
  If Error Then
    Print Error.Text
    Print Error.Where
    Print Error.Backtrace
    Print Error.Class
    Print Error.Code
  Endif

End

Also, when I try to select from the table, e.g.:

$con.Exec("SELECT * FROM sqlite_master")

I get an empty result set...

When I connect through the native SQLite driver, I can access the
table without problems, but with ODBC it doesn't work...

What am I doing wrong?

All the best,

M.
--
Markus Schatten, PhD
Assistant professor and head of Artificial Intelligence Lab
University of Zagreb
Faculty of Organization and Informatics
Pavlinska 2, 42000 Varazdin, Croatia
http://www.foi.hr/nastavnici/schatten.markus/index.html
http://www.researchgate.net/profile/Markus_Schatten1
http://ai.foi.hr




More information about the User mailing list