Re: Difference between tsql and libsybdb

Alberto Pulvirenti <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAJNp6N2dt=gWrTQ+crHDivzTLmfoajbAKEFVRx2Dv6_GPLfj1g@mail.gmail.com>
Hi James,

2012/9/24 James K. Lowden <[email protected]>

> On Mon, 24 Sep 2012 12:33:05 +0200
> Alberto Pulvirenti <[email protected]> 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
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.