Sorry, I was mistaken
When I put a more precise log I found that the problem is after the
returning of the cursor.. in the 'fetch' line.
-- print('fetching rows') -- neither of my print statements worked
log('fetching rows') -- but when I put the output to a
file, this log worked fine
row = cur:fetch ({}, "a") --<-- problem is probably here
-- print('rows fetched')
log('rows fetched') -- this one doesn´t
Luís Santos escreveu:
It was just like the example code in the manual.
require "luasql.sqlite3" -- direct from
luasql/sqlite3.dll
-- from the example in
http://www.keplerproject.org/luasql/examples.html
env = assert (luasql.sqlite3())
con = assert (env:connect("../data/database.sqlite"))
-- ... // Drop table, Create table.. Insert data.. all work
fine
-- obtain a cursor
cur = con:execute[[ SELECT * from people ]] -- then it
explodes
here (An access violation, I believe)
I tried some slightly different queries, to no effect.
It might just have something to do with my compilation. I´ll try to
pinpoint the problem in the C code, so I can come to you with a more
accurate description.
Thnx!
Tomas Guisasola Gorham escreveu:
Hi Luís
I have indeed managed to compile luasql from HEAD using Lua 5.1 and the
SQLite3 driver on Windows (using MinGW... it wasn´t a lot of fun..) and
I have come to a problem using the conn:execute to return a simple
cursor..
Could you send a piece of code that reproduces the problem?
Tomás
--
--
|