preetha.ayyappan at gm... Guest
|
Posted: Thu Sep 25, 2008 3:49 am Post subject: [Freeswitch-users] Error loading ODBC |
|
|
Hi,
when i try to run a sample odbc code from freeswitch console like
freeswitch@localhost> jsrun odbc.js
I found the following error:
API CALL [jsrun(odbc.js)] output:
OK
freeswitch@localhost> 2008-09-25 19:44:35 [ERR] mod_spidermonkey.c:3303
js_api_use() Error loading ODBC
2008-09-25 19:44:35 [ERR] odbc.js:11 mod_spidermonkey() ReferenceError:
ODBC is not defined
code is:
use("ODBC");
var people = {};
people["authur"] = 30;
people["ford"] = 42;
people["trillian"] = 29;
people["zaphod"] = 304;
people["marvin"] = 1000001;
db = new ODBC("freeswitchdb", "freeswitch", "1234");
db.connect();
db.exec("create table demo (name varchar(255), age varchar(80));");
for (var i in people) {
sql = "insert into demo values('" + i + "', " + people[i] + ");";
console_log("debug", sql + "\n");
db.exec(sql);
}
sql = "select * from demo;";
var line = "==============================\n";
console_log("notice", line);
db.exec(sql);
console_log("debug", "row count: " + db.numRows() + "\n");
while(db.nextRow()) {
var row = db.getData();
for (var i in row) {
console_log("debug", "[" + i + "] = [" + row[i] + "]\n");
}
console_log("debug", "\n");
}
console_log("notice", line);
what should i specify in DSN.here i gave freeswitchdb which is a database
name.please assist me to solve this problem
Thanks
--
View this message in context: http://www.nabble.com/Error-loading-ODBC-tp19665456p19665456.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|