Stuart Henderson wrote:
On 2009-07-17, Vijay Sankar <vsan...@foretell.ca> wrote:
Abel Camarillo wrote:
On Fri, Jul 17, 2009 at 02:55:53PM -0500, Vijay Sankar wrote:
I am trying to compile freetds-stable with iodbc and used the following
env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
./configure --with-iodbc --disable-threadsafe
Even though isql.h is in /usr/local/include I get the error saying
isql.h not found.
How can I resolve this? (I am trying to compile the source to see if I
can get libtdsodbc, so using the standard package will not work)
Appreciate any clues.
Thanks very much,
Vijay
--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: vsan...@foretell.ca
I think that it will be a lot easier to change the port to reflect you
changes.
try looking a the port and see what it does.
By changing the port I was able to get libtdsodbc (this was a few days
ago and I had sent the modified Makefile to misc@) but I had problems
setting up a DSN through iodbcadm (as well as through text files). Also,
when I tried to compile pyodbc, I got errors saying that -liodbc not
recognized. My sense is that I am missing some fundamental knowledge and
so this was just an attempt to learn as well as see if compiling from
source gives me any clues on setting up pyodbc or if there are any
changes with the newer freetds. I know this can work on other platforms
but if at all possible I want to stick with OpenBSD.
Thanks,
Vijay
since you have produced a libtdsodbc.so, try something like this.
it won't work with the in-tree port as things stand at the moment.
$ cat /etc/iodbc/odbc.ini
[ODBC Data Sources]
MSSQL-asterisk = FreeTDS
[MSSQL-asterisk]
description = Asterisk ODBC for MSSQL
driver = FreeTDS
server = blahblahblah
port = 1433
database = virtualreceptionist
tds_version = 7.0
language = us_english
$ cat /etc/iodbc/odbcinst.ini
[ODBC Drivers]
FreeTDS = Installed
[FreeTDS]
Driver = /usr/local/lib/libtdsodbc.so
Setup = /usr/local/lib/libtdsodbc.so
$ iodbctest 'DSN=MSSQL-asterisk;UID=sa;PWD=blahblahblah'
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.0126
Driver: 0.82 (libtdsodbc.so)
SQL>select @@VERSION;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
result set 1 returned 1 rows.
SQL>^D
Have a nice day.
DBI::Sybase is much easier to use, but this proves that you can get
ODBC/FreeTDS working on OpenBSD...
This is very helpful information and your comments all along have helped
solve this. Thanks very much.
I retraced all the steps and repeated the installation on a clean
system. That was when I realized that even though I had modified the
Makefile to include with-iodbc, I did not have a LIBDEPENDS +=
iodbc::databases/iodbc. As a result, the ODBC driver was not loaded and
that was the root cause of the problem.
Now MSSQL 2000 DSN and MSSQL2005 DSNs seem to work properly.
server11# iodbctest 'DSN=MSSQL-new;UID=sa;PWD=sql2005'
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.0126
Driver: 0.63 (libtdsodbc.so)
SQL>select @@version
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)
Nov 24 2008 13:01:59
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
result set 1 returned 1 rows.
server11# iodbctest 'DSN=MSSQL-old;UID=sa;PWD=sql2000'
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.0126
Driver: 0.63 (libtdsodbc.so)
SQL>select @@version
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
result set 1 returned 1 rows.
SQL>quit
Have a nice day.server11#
Thanks again,
Vijay
--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: vsan...@foretell.ca