Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Error loading ODBC


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
preetha.ayyappan at gm...
Guest





PostPosted: Thu Sep 25, 2008 3:49 am    Post subject: [Freeswitch-users] Error loading ODBC Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services