Skip to Content.
Sympa Menu

freetds - Re: [freetds] Difference between tsql and libsybdb

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Alberto Pulvirenti <alberto.pulvirenti AT crowdengineering.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Difference between tsql and libsybdb
  • Date: Mon, 24 Sep 2012 16:49:22 +0200

Hi James,

2012/9/24 James K. Lowden <jklowden AT freetds.org>

> On Mon, 24 Sep 2012 12:33:05 +0200
> Alberto Pulvirenti <alberto.pulvirenti AT crowdengineering.com> wrote:
>
> > I have implemented a C++ class which makes use of the libsybdb to
> > connect to a SQL Server 2008 database and allow for some standard
> > queries.
>
> You may wish to look at sourceforge.net/projects/dbstreams/. :-)
>
> > if I try to log into the same DB on the same instance using my
> > class, it fails because it is kicked out by the logon trigger.
> > What I do is just creating a LOGINREC object and set it with what is
> > needed to access the DB (user, password, port, host, etc,), which is
> > nothing more and nothing less than what I put in the command line
> > when I call tsql.
> >
> > I called the admins of that SQL Server instance and the only help I
> > got was the log of some error message which is the following:
> >
> > >> SELECT failed because the following SET options have incorrect
> > >> settings:
> > 'CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING'.
> > >> Verify that SET options are correct for use with indexed views
> > >> and/or
> > indexes on computed columns and/or filtered indexes and/or query
> > notifications
> > >> and/or XML data type methods and/or spatial index operations
>
> Look at the login process for bsqldb. Also perhaps try the source code
> from the Tenderfoot section of the UG. It sounds like your server may
> require you to call dboption() before dbopen().
>

Thanks for this suggestion, but since I am noob in this respect, can you
explain me how I can look at this?
And what's the UG (and its tenderfood section)?

I have thought that maybe I could need dboption()'s but I didn't manage to
find a help about what options to set, how and what is their meaning.

Looking slightly more in detail, I found that the login packet sent by my
application to that server is an XML block (since I am not the owner of
the credentials I hide them):

<EVENT_INSTANCE><EventType>LOGON</EventType><PostTime>2012-09-20T15:43:17.147</PostTime><SPID>385</SPID><ServerName>[...]</ServerName><LoginName>[...]</LoginName><LoginType>SQL
Login</LoginType><SID>[...]</SID><ClientHost>192.168.235.238</ClientHost><IsPooled>0</IsPooled></EVENT_INSTANCE>

...and it could be possible that the server does not like or is not well
configured to accept messages like them, but I didn't ever tell my
implementation to communicate in XML, and then I don't know if there are
other possibilities (and which one is used by "tsql" executable), and how I
can eventually switch among them.

Thanks a lot and best regards.

Alberto


> 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