Subj : database object To : DOVE-Net.Sync_JavaScript From : Ragnarok Date : Sun Apr 08 2007 05:32 pm Hi people i try to add a database support the the js script in syncrhonet i use (at moment) sqlite as backend. i thinking in an object that may be used to easy storage data for door or modules and easy access via sql standard commands. an simple example of script code : db = new Sqlite("/tmp/tu_base.db"); db.open(); db.stmt = "CREATE TABLE prueba (field1 int , field2 varchar(100))"; db.exec(); db.stmt = "INSERT INTO prueba (field1,field2) VALUES (10,'hola')"; db.exec(); db.stmt = "SELECT * FROM prueba"; db.exec(); for(i=; i< db.numRows; i++) { writeln (db.result[i]['field1'] + '-' + db.result[i]['field2']); } db.close(); im still working and not yet complete, also i dont know if will add to the futures sync versions. you can see source code and example here: http://bbs.docksud.com.ar/~ragnarok/sync/js_sqlite/ i wait for comments, suggest or wahtever for people that make js scripts. Saludos! -- Dock Sud BBS http://bbs.docksud.com.ar telnet://bbs.docksud.com.ar --- þ Synchronet þ Dock Sud BBS TLD 24 HS - www.docksud.com.ar .