Re: Difference between tsql and libsybdb

Alberto Pulvirenti <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAJNp6N2+_DBHcfYoVdyj2Spzb1risjMfpFyaxTB7dRbxRBf4eA@mail.gmail.com>
Sorry for bothering else you: How do I set such options before doing the
dbopen()? It seems to require an already initialized DBPROCESS object...

2012/9/25 Alberto Pulvirenti <[email protected]>

> Hello,
>
> thanks for all help, I am looking at the points you suggested, but I
> noticed that I forgot to specify the problem occurred.
> Once I asked to the DB admin to report me the log of the failed operation
> in this logon trigger which kicks me out, the result is this:
>
> 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.
>
>
>
> but the problem is that when I try to access the same server using tsql (I
> mean the executable provided by this package, not the protocol), without
> telling it anything more than the host, user, password and port, it logs
> into the same server without any problem.
> Since it speaks also about XML, that drove me to the idea that there must
> be something sent in XML which this server doesn't like, while tsql (yet
> the program, I mean) does not.
>
> Thanks, best regards
>
> Alberto
>
> 2012/9/25 James K. Lowden <[email protected]>
>
> On Mon, 24 Sep 2012 16:49:22 +0200
>> Alberto Pulvirenti <[email protected]> wrote:
>>
>> > > 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)?
>>
>> The source code for bsqldb is in src/apps/bsqldb.c in your FreeTDS
>> source tree.  The UG is in the doc directory and was installed when you
>> ran "make install".  (Where depends on how it was configured.)  The
>> Tenderfoot guide to DB-Library is part of the UG.  The UG for the
>> current release is online at
>> http://www.freetds.org/userguide/samplecode.htm.
>>
>> These resources are intended to make your db-lib programming easier.
>>
>> > 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.
>>
>> A complete db-lib reference manual proved to be more work than your
>> friendly maintainer could do.  The incomplete one can still help,
>> though, if only because it's a complete list of the implemented
>> functions. If you follow the Documentation link on the website,
>> you'll find the reference manual.
>>
>> Once you know the function name -- in this case dbsetopt(), not
>> dboption(), sorry -- then I normally search the web for the name.
>> Microsoft's and Sybase's manuals usually show up in the first few
>> hits.
>>
>> > 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>
>> >
>>
>> You will find the layout of the login packet also among the documents
>> on the website.  The login packet is not XML, thank heaven.  You
>> application does not send a login packet at all if it uses db-lib.
>> The library sends the packet (correctly formed) when you call
>> dbopen().
>>
>> 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.