SQLite question

new topic     » topic index » view thread      » older message » newer message

Probably not a Euphoria problem; but, I don't have a clue!
Need an idea here...

I started using sqlite3 about a year ago instead of eds. Windows 10 Euphoria 4.0.5 (362497032f33, 2012-10-11) for Windows

eusqlite3.ew 
-- Version :    0.3 
-- Author :     Ray Smith 
-- License :    None 
-- Updated :    Chris Burch 
-- Updated :    August 2005 Tone Skoda 
 
 
The relevant code:

sequence sql = sprintf("SELECT date,mbr_id,duty,deleted FROM calendar WHERE date >= %d ",start_date) & 
			sprintf("AND date <= %d AND deleted = 0",end_date) 
sequence c_data = sqlite_get_table(db,sql) 

The sqlite query (above) is activated by a gui button. The first button press works as expected. Wait seconds. The next button press yields:

Fatal SQLite Error: 
When Executing: sqlite_get_table("SELECT date,mbr_id,duty,deleted FROM calendar WHERE date >= 20181201 AND date <= 20181231 AND deleted = '0';" 
Error Number: 21 
 
#define SQLITE_MISUSE      21   /* Library used incorrectly */ 

From the SQL manual:
If SQLite ever returns SQLITE_MISUSE from any interface, that means that the application is incorrectly coded and needs to be fixed. 

There are no prepared statements. Every query is sent independently of any other query. It seems to me that I should be able to send any query to the DB, even the same one twice in a row. I don't know thy this happens and therefore don't know what to do about it.

Any thoughts would be appreciated.
Regards,
jd

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu