Do you mean did I have this in my code?require "luasql.odbc";Yes, that is there.On Mon, Mar 29, 2010 at 8:57 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com> wrote:
The config is correct. But that is UnixODBC configuration. Then you need to load the LUA odbc driver for lua code access the UnixODBC.Did you load the luasql.odbc?The code is correct.ThanksLloyd
On Mon, Mar 29, 2010 at 11:46 AM, Neil Patel <neilp@cs.stanford.edu> wrote:Yes! I followed the instructions here for setting up ODBC, including linking the .ini files in freeswitch/etc. Based on the test below it seems that the driver is working properly. Is the code below correct (i.e. 'require "luasql.odbc";' and 'env = assert(luasql.odbc());')?Thanks,NeilOn Mon, Mar 29, 2010 at 7:55 AM, Aloysius Lloyd <lloyd.aloysius@gmail.com> wrote:
Did you uncomment from the following line in config file.T= odbcThanksLloydOn Mon, Mar 29, 2010 at 3:30 AM, Neil Patel <neilp@cs.stanford.edu> wrote:
Thanks all, got it to compile and seems like my odbc connection is working properly:[root@topaz bin]# isql maxpowersoft_odbc <myUser> <myPwd>+---------------------------------------+| Connected! || || sql-statement || help [tablename] || quit || |+---------------------------------------+SQL>In my lua script I haverequire "luasql.odbc"But am getting this error:2010-03-28 22:21:42.080859 [ERR] mod_lua.cpp:182 /usr/local/freeswitch/scripts/AO/paths.lua:49: [unixODBC][Driver Manager]Data source name not found, and no default driver specifiedThe line it's failing on is:env = assert (luasql.odbc());Thanks in advance for letting me know what I'm doing wrong.Best,NeilOn Sun, Mar 28, 2010 at 10:03 PM, mayamatakeshi <mayamatakeshi@gmail.com> wrote:
On Mon, Mar 29, 2010 at 1:44 PM, Neil Patel <neilp@cs.stanford.edu> wrote:
Hi Lloyd,Even after the change to the config file below, I can't get the package to compile:[root@topaz luasql-2.1.1]# makeexport MACOSX_DEPLOYMENT_TARGET="10.3"; gcc -O2 -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic -I../compat/src -DUNIXODBC -I/usr/local/include -I/usr/local/include -o src/odbc.so -shared src/luasql.o src/ls_odbc.o -L/usr/local/lib -lodbc/usr/bin/ld: src/luasql.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPICsrc/luasql.o: could not read symbols: Bad valuecollect2: ld returned 1 exit statusmake: *** [src/odbc.so] Error 1Anything I need to change or do other than add -fPIC to CFLAGS?
Here's
the script I use.
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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