The tests worked, but isql still does not:<br><br>[rick@buster trackerdb]$ dltest /usr/local/lib/libtdsodbc.so SQLConnect<br>SUCCESS: Loaded /usr/local/lib/libtdsodbc.so<br>SUCCESS: Found SQLConnect<br>[rick@buster trackerdb]$ ODBCSYSINI=/usr/local/etc<br>
[rick@buster trackerdb]$ export ODBCSYSINI<br>[rick@buster trackerdb]$ isql -v sqlserver<br>[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified<br>[ISQL]ERROR: Could not SQLConnect<br>
<br><div class="gmail_quote">On Fri, Mar 27, 2009 at 1:31 PM, Nick Gorham <span dir="ltr"><<a href="mailto:nick@lurcher.org">nick@lurcher.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Rick Schumeyer wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm trying to (eventually) connect a ruby-on-rails program to SQL<br>
Server. I'm running CentOS 5.2. I installed unixODBC and FreeTDS<br>
from source in the default location (/usr/local).<br>
<br>
The FreeTDS part seems to be working. The command "tsql -S eeyoredb<br>
-U xxx -P xxx" is successful.<br>
<br>
But I cannot get the unixODBC part to work. I always get<br>
"Data source name not found, and no default driver specified"<br>
<br>
I have tried many things suggested by several google searches, but no success.<br>
<br>
Can I create the odbc.ini and odbcinst.ini files in /usr/local/etc<br>
using a text editor? Or do I need to use the odbcinst program? (I'm<br>
not really sure what that does)<br>
<br>
</blockquote></div>
Yep, they are just text files. I always just edit them by hand.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The current state of my odbc.ini and odbcinst.ini files are below.<br>
<br>
Then I try isql:<br>
<br>
[rick@buster ~]$ isql -v sqlserver<br>
[IM002][unixODBC][Driver Manager]Data source name not found, and no<br>
default driver specified<br>
[ISQL]ERROR: Could not SQLConnect<br>
<br>
I'm really lost.<br>
<br>
</blockquote>
<br></div>
I would check that its expecting odbc.ini to be there. Try setting<br>
<br>
ODBCSYSINI=/usr/local/etc<br>
export ODBCSYSINI<br>
<br>
to make sure.<br>
<br>
Other than that it looks ok, you could check the driver can be loaded<br>
<br>
dltest usr/local/lib/libtdsodbc.so SQLConnect<br>
<br>
-- <br><font color="#888888">
Nick</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
unixODBC-support mailing list<br>
<a href="mailto:unixODBC-support@mailman.unixodbc.org" target="_blank">unixODBC-support@mailman.unixodbc.org</a><br>
<a href="http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support" target="_blank">http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support</a><br>
</div></div></blockquote></div><br>