[Gambas-user] SQLite 3 and Gambas 2.20

Barnett Winton barneywinton at ...867...
Mon Oct 4 02:44:29 CEST 2010


  Hi everyone,
I have recently discovered Gambas and am using it on a PCLinuxOS 2010 
distribution.
I have used SQLite databases under VB and RealBasic but am kindof 
stumped with SQLite3.
I am writing a Ham radio Logger App and I need to check the DB tables 
etc on loading the App.

I have been able to create a DB file and 5 tables but when I go to check 
whether the Tables exist, my code always returns a FALSE ( ie; could not 
find nominated Table).

  I can see them in the FireFox SQLite DB manager. BTW where can I get 
the Gambas DB Manager ?

I used the Example code to start with but am getting hung up on the 
RESULT data type and how to use it.

IF NOT $hConn.Tables.Exist("Contests") THEN
     RETURN FALSE
END IF

always returns false.

$strSQL = "select name from sqlite_master WHERE type = 'table'"
$Res = $hConn.Exec($strSQL)

populates the result variable with 5 entries ( I have 5 tables created).

I am a bit confused as it appears that SQLite3 holds the individual 
tables in the sqlite_master table.

How do I get to open/find individual tables in a SQLite3 DB ?

Regards,

Barney



More information about the User mailing list