<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Make sure to follow this example:  <a
 href="http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#General_Configuration">http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#General_Configuration</a><br>
Remember to use the isql client to test your DSN connection.  When that
passes you'll be home free.<br>
Regards,<br>
Chris<br>
<br>
Stephen Crosby wrote:
<blockquote
 cite="mid:11990ade0901070938y14f15ba7le95e1c6edfaad70f@mail.gmail.com"
 type="cite">
  <pre wrap="">I'm assuming you have your driver set up properly since you left that
part out, but I got mine working a few weeks ago and I'll show you
what I've got if it helps:

odbc.ini:
[freeswitch_ph]
Driver       = /usr/lib/odbc/libmyodbc.so
Description  = MyODBC 3.51 Driver DSN
SERVER       = localhost
PORT         =
USER         = freeswitch_ph
Password     =
Database     = freeswitch_ph
OPTION       = 3
SOCKET       =

somescript.js
use("ODBC");
var DSN = 'freeswitch_ph';
var DB_USER = 'freeswitch_ph';
var DB_PASS = '';
var db = new ODBC(DSN, DB_USER, DB_PASS);
db.connect();



On Wed, Jan 7, 2009 at 8:53 AM, fidibus83 <a class="moz-txt-link-rfc2396E" href="mailto:fidibus83@aol.com">&lt;fidibus83@aol.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Yes, but why isn't it found?



My odbc.ini configuration:



[fs01_odbc]

Driver=MySQL

SERVER=localhost

PORT=3306

DATABASE=freeswitch

Socket = /var/lib/mysql/mysql.sock







Javascript:





use("ODBC");

  var DSN="fs01_odbc";

  var DB_USER="XXXXX";

  var DB_PASS="YYYYY";

  var db = new ODBC(DSN, DB_USER, DB_PASS);

  db.connect();

…..



________________________________

Von: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>
[<a class="moz-txt-link-freetext" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>] Im Auftrag von Ken
Rice
Gesendet: Mittwoch, 7. Januar 2009 17:42
An: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>
Betreff: Re: [Freeswitch-users] no file mod_spidermonkey_odbc.so



Well your error tells you explicity DSN not found...

________________________________

From: fidibus83 <a class="moz-txt-link-rfc2396E" href="mailto:fidibus83@aol.com">&lt;fidibus83@aol.com&gt;</a>
Reply-To: <a class="moz-txt-link-rfc2396E" href="mailto:freeswitch-users@lists.freeswitch.org">&lt;freeswitch-users@lists.freeswitch.org&gt;</a>
Date: Wed, 7 Jan 2009 17:31:54 +0100
To: <a class="moz-txt-link-rfc2396E" href="mailto:freeswitch-users@lists.freeswitch.org">&lt;freeswitch-users@lists.freeswitch.org&gt;</a>
Subject: Re: [Freeswitch-users] no file mod_spidermonkey_odbc.so

I have another problem!

I want to connect to a mysql database through javascript.

I get this error:
[ERR] switch_odbc.c:160 switch_odbc_handle_connect() STATE: IM002 CODE 0
ERROR: [unixODBC] [Driver Manager]Data source name not found, and no default
driver specified
[ERR] mod_spidermonkey_odbc.c:233 odbc_exec() Database is not connected!
[ERR] mod_spidermonkey_odbc.c:289 odbc_next_row() database is not connected!

But when I test by running the utility isql the database is connected!

What's going wrong?


________________________________

Von: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>
[<a class="moz-txt-link-freetext" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>] Im Auftrag von Chris
Danielson
Gesendet: Mittwoch, 7. Januar 2009 16:39
An: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>
Betreff: Re: [Freeswitch-users] no file mod_spidermonkey_odbc.so

Anytime.  Good luck.

fidibus83 wrote:
Sorry Chris, my mistake. Mod_spidermonkey_odbc.so does exist now.

I wanted to said that I'm sorry for my stupid mistake that I uncomment the
wrong thing.

But thank you very much for your help!


________________________________

Von: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>
[<a class="moz-txt-link-freetext" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>] Im Auftrag von Chris
Danielson
Gesendet: Mittwoch, 7. Januar 2009 16:17
An: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>
Betreff: Re: [Freeswitch-users] no file mod_spidermonkey_odbc.so

Fidibus,
Make sure that you also have installed unixodbc.  As shown here:
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#unixodbc">http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc#unixodbc</a>

Kind Regards,
Chris

fidibus83 wrote:
Oh, I'm sorry.

Should I comment mod_spidermonkey_odbc in root/freeswitch/build/modules.conf
again?


________________________________

Von: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a>
[<a class="moz-txt-link-freetext" href="mailto:freeswitch-users-bounces@lists.freeswitch.org">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>] Im Auftrag von
Michael Jerris
Gesendet: Mittwoch, 7. Januar 2009 15:15
An: <a class="moz-txt-link-abbreviated" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>
Betreff: Re: [Freeswitch-users] no file mod_spidermonkey_odbc.so

you would need to modify the modules.conf in the root of the source dir, not
in the build dir.




_______________________________________________
Freeswitch-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
Freeswitch-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
  </pre>
</blockquote>
</body>
</html>