Hello, I'm using GNADE and esql to insert some records in a database. Please check the code at the end of this post for exact implementation. The database is MSAccess accessed using ODBC. The thing is that the first record is correctly inserted (I can later see the record), but the second call to insert fails with Line 79 in package Aenea.Db : *** Exception in query **** SQL State : 42000 SQL Code :-1 --------------- [17:32:38.42] [E] Database insertion failed: Exception name: GNU.DB.SQLCLI.INVALID_CURSOR_STATE Message: [Proc=SQLCloseCursor][Server=hyperion][State=24000][Microsoft] [Controlador ODBC Microsoft Access]Estado del cursor no v�lido Call stack traceback locations: 0x438ee3 0x439bf6 0x439ef1 0x43b7cd 0x48c8ef 0x6ba969 0x6d5962 As you can see, it seems as if some cursor were left open and tried to be reused. I've found just an example of insertion and I can see anything special there. I don't know if I'm doing something wrong or it is the fault of MSAccess or esql. Any hints? This is my first look at GNADE and I'm somewhat lost. Thanks, Alex. --------8<---------- Code begins here -- -- Init is called once, Insert_row is called periodically. with Aenea.Net; with Aenea.Trace; with Sql_standard; use Sql_standard; package body Aenea.Db is -- Database EXEC SQL DECLARE DB DATABASE; ------------------------------------------------------------------------ -- Init -- ------------------------------------------------------------------------ procedure Init is begin EXEC SQL WHENEVER SQLERROR RAISE DB_Error; -- Connect EXEC SQL CONNECT BY DB TO "hyperion"; Trace.Log ("Connection with database successful.", Trace.Informative); end Init; ------------------------------------------------------------------------ -- Insert_row -- ------------------------------------------------------------------------ procedure Insert_row is EXEC SQL BEGIN DECLARE SECTION; Hubs, Leaves : INT; EXEC SQL END DECLARE SECTION; begin Hubs := INT (Net.Counter.Avg_hubs); Leaves := INT (Net.Counter.Avg_leaves); EXEC SQL AT DB insert into g2crawl (hubs, leaves, fecha) values (:Hubs, :Leaves, Now ()); EXEC SQL AT DB COMMIT; exception when E : DB_Error => Trace.Log ("Database insertion failed: " & Trace.Report (E), Trace.Error); when E : others => Trace.Log ("Database insertion failed: " & Trace.Report (E), Trace.Error); end Insert_row; end Aenea.Db;