[Freeswitch-users] lua freeswitch.Dbh sqlite error
Steven Ayre
steveayre at gmail.com
Tue Feb 5 15:55:36 MSK 2013
core: was an old prefix? I knew that change broke some ODBC DSNs (names
without username+password, eg when they're specified in odbc.ini) but
hadn't realised that had been broken too - that needs documenting as well
on the Wiki I guess...
http://wiki.freeswitch.org/wiki/Release_Notes#odbc-dsn
Just a thought for the developers, but perhaps modules with odbc-dsn
parameters should have this renamed to dsn or something now since it's not
odbc-specific at all any longer. Easy enough to recognise both 'dsn' and
'odbc-dsn' names to remain backwards compatible (which I've seen done with
typos in config setting names in the past as precedent).
-Steve
On 5 February 2013 11:03, François Delawarde
<fdelawarde at wirelessmundi.com>wrote:
> The behavior recently changed from "core:<path>" to "sqlite://<path>".
>
> Update: I just tested and it seems that "sqlite://<path>" doesn't work,
> but as sqlite is the default, you can just omit the prefix and use
> "<path>" to make it work.
>
> François.
>
>
> On Tue, 2013-02-05 at 10:37 +0000, Steven Ayre wrote:
> > 'Failure to connect to PGSQL core' happens on ODBC connections, that
> > seems to be a minor bug in the error message.
> >
> >
> > From the unixODBC error it's interpreting this as a ODBC DSN. The
> > reason is the sqlite prefix is sqlite:// not core://
> > (see http://wiki.freeswitch.org/wiki/DSN). You also don't have enough
> > slashes.
> >
> >
> > Try:
> > local dbh = freeswitch.Dbh("sqlite:///usr/local/temp/database.db");
> >
> >
> >
> > (note the 3 slashes - :// is standard URI format, the 3rd indicates an
> > absolute path).
> >
> >
> > -Steve
> >
> >
> >
> >
> > On 5 February 2013 08:56, Carlo Dimaggio <jaasmailing at gmail.com>
> > wrote:
> > Hi all!
> >
> > I have a lua script in which i have a statement that connects
> > to a sqlite db:
> >
> > local dbh =
> > freeswitch.Dbh("core:/usr/local/temp/database.db");
> >
> > but i receve in FS CLI this error that refers to a Pgsql
> > instead of sqlite:
> >
> > 2013-02-05 09:40:10.379612 [ERR] switch_odbc.c:365 STATE:
> > IM002 CODE 0 ERROR: [unixODBC][Driver Manager]Data source name
> > not found, and no default driver specified
> > 2013-02-05 09:40:10.379612 [CRIT] switch_core_sqldb.c:504
> > Failure to connect to PGSQL core!
> > 2013-02-05 09:40:10.379612 [ERR] freeswitch_lua.cpp:354
> > Connection failed. DBH NOT Connected.
> > 2013-02-05 09:40:10.379612 [ERR] freeswitch_lua.cpp:435 DBH
> > NOT Connected.
> >
> >
> > Can you help me?
> >
> > Best regards,
> >
> >
> >
> _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> >
> >
> >
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
> >
> >
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> >
> >
> >
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130205/db31810b/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list