[freetds] TDS and ldap

Nicolas Goy goyman at goyman.com
Wed Apr 14 20:21:10 EDT 2004


Fine, know it work a little bit better (a little bit:)).

The error changed, now I got:
Message: [FreeTDS][SQL Server]Attempt to initiate a new SQL Server 
operation with results pending.

00:00000:00018:2004/04/15 02:09:17.52 server  TDS_LANG, spid 18: command 
text:
set textsize 64512 use GAddress
00:00000:00018:2004/04/15 02:09:17.53 server  TDS_LANG, spid 18: command 
text:
BEGIN TRANSACTION
00:00000:00018:2004/04/15 02:09:17.53 server  TDS_DYNP, spid 18: command 
text:
create proc w53y006000 as SELECT 
id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM 
ldap_oc_mappings


as you can see, the rollback disapeard in the log.

So I think the error is generated with the second sql statement.

I think the ldap backsql work this way:

It read one result of the oc_mappings query, then it populate it with 
attr_mappings query. But the tds driver refuse the attr_mapping query 
because all results from oc_mappings query have not been read. Am I right?

As I don't want to rewrite the ldap back-sql module (putting result into 
a temp array...). I wanted to know if there was anyway to correct that.

I browsed the archive, but I prefer to ask the question again before 
beginning to play with the sources, as the have certainly changed.

Regards

Goyman

James K. Lowden wrote:
> On Thu, 15 Apr 2004, Nicolas Goy <goyman at goyman.com> wrote:
> 
>>BEGIN TRANSACTION
>>00:00000:00013:2004/04/15 01:00:37.49 server  TDS_DYNP, spid 13: command
>>
>>text:
>>create proc w53y006000 as SELECT 
>>id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM 
>>ldap_oc_mappings
>>00:00000:00013:2004/04/15 01:00:37.53 server  TDS_LANG, spid 13: command
>>
>>text:
>>IF @@TRANCOUNT > 0 ROLLBACK BEGIN TRANSACTION
>>
>>the problem is that the line IF @@TRANCOUNT > 0 ROLLBACK BEGIN 
>>TRANSACTION return -1 and the ldap server think the request failed and 
>>it stop.
>>
>>I really need this ldap server to work with the sybase backend, so help 
>>will be greatly apreciated.
> 
> 
> Right.  This is an identified problem with 0.62.1.  Get 0.62.3 instead. 
> If you try the unit tests, be advised that odbc/unittest/raiseerror.c
> (with 2 e's) fails, but the fault lies in the test, not in the raiserror
> handling.  See the README, ChangeLog for more details.  
> 
> You're almost home.  :-)
> 
> --jkl
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds




More information about the FreeTDS mailing list