[Vala] SQLite callback problem



Hello,

I am having problems with the SQLite.exec callback.

There is any form to access from inside of the callback (public static int
....) to any public GLib.List?

Whe I try to compile it always I get a "Access to instance member
'classxxxxx.varxxxx' denied"

In example (shorted):

public class MyDB:GLib:object {

       Database db;
       int Counter;
       int rc;

       public MyDB() {

                 rc = Database.open ("mydb.slite", out db);
                 rc = db.exec ("select * from test", SQLCallback, null);

        }

        public static int SQLCallback (int nColumns, string[] Data, string[]
nmColumns) {

                  Counter = 0;
                  return 0;

         }
}

I get the error in the "Counter = 0;" line.

Someone? Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]