Skip to Content.
Sympa Menu

freetds - Re: [freetds] Create a shell to get data from SQL Server using FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: dmarrer AT bci.cl
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Create a shell to get data from SQL Server using FreeTDS
  • Date: Wed, 12 Nov 2008 18:03:28 -0300

Hello James:

Thank you for your answer.

I use this options:

./configure -prefix=mypath -with-odbc-nodm=DIR

and FreeTDS compile OK and build lib libtdsodbc.so

Now I try this:

osql -S server_def -U user -P password

and the result is:

osql: error: no "isql" command found. Is unixODBC installed?

I need install unixODBC or not to access SQL Server using FreeTDS?

Thanks a lot for your help

Daymel




"James K. Lowden" <jklowden AT freetds.org>

Enviado por: freetds-bounces AT lists.ibiblio.org
12-11-2008 16:19
Por favor, responda a
FreeTDS Development Group <freetds AT lists.ibiblio.org>


Para
FreeTDS Development Group <freetds AT lists.ibiblio.org>
cc

Asunto
Re: [freetds] Create a shell to get data from SQL Server using FreeTDS






dmarrer AT bci.cl wrote:
>
> I try to do this:
>
> copy sql.h, sqlext.h and sqltypes.h to /usr/local/include dir
>
> ./configure -prefix=mypath -with-odbc-nodm=/usr/local/include
>
> And the result is
>
> checking compile-time options
> configure: error: sql.h not found

So close!

$ ./configure --help | grep nodm
--with-odbc-nodm=DIR build odbc using headers in DIR/include

You don't specify the include directory; you specify the directory that
has an include directory. In your case, /usr/local.

It may seem a little odd, but it's not crazy. The notion is that a normal
tree has pairs of include and library directories e.g.,

/usr/include /usr/local/include /usr/pkg/include
/usr/lib /usr/local/lib /usr/pkg/lib

Because a configure script typically needs both, the user provides just
the parent. It so happens that --with-odbc-nodm has no use for a lib/
directory, but the pattern is followed anyway.

> Now I want to create a shell that connect to SQL Server using FreeTDS
> and write result data in a text file
>
> How I write this shell? Which libraries I have to use?

I don't know what you mean by "write a shell". freebcp will execute a
query and write the results to a file. So will sqsh. So will bsqldb.
Pick your poison. None of them requires ODBC.

HTH.

--jkl


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page