[prev in list] [next in list] [prev in thread] [next in thread]
List: openldap-devel
Subject: Re: backsql_get_attr_vals()
From: Dmitry Kovalev <mitya () seismic ! geol ! msu ! ru>
Date: 2001-04-18 15:03:43
[Download RAW message or body]
Thanks Nikos!
I recall that I had some troubles with this and *non-binary* values, but after all, it could be a driver
glitch to report wrong length for varchar fields... Honestly, this needs testing with all databases
supported...
WBW, Dmitry
Nikos Mavroyanopoulos wrote:
> Hello,
> I've been trying to use openldap with binary fields in our database using the backend for sql,
> and unixodbc. It seems that the following in entry-id.c in function backsql_get_attr_vals(),
> makes the whole thing non binary safe:
> backsql_entry_addattr(bsi->e,row.col_names[i],row.cols[i], strlen(row.cols[i]));
> ^^^^^^^^^^^^^
> (this is after SQLFetch())
>
> However this strlen() can be avoided by using:
> backsql_entry_addattr(bsi->e,row.col_names[i],row.cols[i], row.is_null[i]);
>
> Which is defined to return the character length in odbc (this is the last parameter in SQLBindCol()).
>
> thank you for your fine work in back-sql!
>
> --
> Nikos Mavroyanopoulos
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic