On Oct 5, 2010, at 8:28 PM, Petite Abeille wrote:

> On Oct 5, 2010, at 8:20 PM, Tomas Guisasola Gorham wrote:
> 
>>> (1) Have the current drivers work properly :))
>>      Could you send examples?
> 
> Well, right at this moment, this is just related to the SQLite driver which 
> seems not to return the result of pragma calls in recent version of SQLite. 
> See recent "luasql +sqlite3 fetch from pragma?" thread. 

Specifically, the bellow example works properly under 3.6.13, but raises an 
exception under 3.7.2 when calling 'cur:fetch':

lua: TestDB.lua:7: database schema has changed
stack traceback:
        [C]: in function 'assert'
        TestDB.lua:7: in main chunk
        [C]: in ?

--8<--

local luasql = require( 'luasql.sqlite3' )

local anEnvironment = assert( luasql.sqlite3() )
local aConnection = assert( anEnvironment:connect( 'test.db' ) )
local aCursor = assert( aConnection:execute( 'pragma database_list' ) )
local aRow, anException = assert( aCursor:fetch( {}, 'a' ) )

while aRow do
    print( aRow.file, aRow.name, aRow.seq )
    aRow, anException = aCursor:fetch( aRow, 'a' )
end

aCursor:close()
aConnection:close()
anEnvironment:close()

-->8--



_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to