Skip to Content.
Sympa Menu

freetds - RE: first patch to odbc

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: first patch to odbc
  • Date: Tue, 9 Apr 2002 07:06:25 -0400 (EDT)



Hi,

Overall the patch looks pretty good, although I've just eyeballed it and
haven't applied and tested it yet.

On Tue, 9 Apr 2002, ZIGLIO Frediano wrote:

> > - Many functions you changed so that they return failure instead of
> > success. You didn't say why this change was done. Do you think this
> > might break existing code in other projects?

I'm going to agree here. Returning SQL_ERROR will cause some applications
to fail even if the call is non-critical to the operation of the program
(it happens). Unless the application really needs to rely on the call,
stubs should return SQL_SUCCESS. Perhaps a STUBRETURN macro that returns
SQL_SUCCESS or SQL_ERROR depending on whether one is actively debugging or
just trying to get something running.

> - added some type handling (like SYBINTN) converting from tds to odbc

In the ctlib api the client_type function is passed server type and size.
Nothing wrong will passing the column structure, but we should probably be
consistant in how we do this. I'll do the fix up when I apply.

> - fixed some strange indentation
>
> >
> >- The use of // as a comment marker is not K&R.
> >
>
> I use mainly C++, sometime ANSI C, what are main differency from K&R and
> ANSI ?

Some compliers (notably C Set on AIX) have troubles with // comments and
have to be passed odd parameter to recognize them (-qlanglvl=extended
for C Set IIRC). Also it hurts portability to certain older platforms.
I should have mentioned this specifically, hmmm...perhaps it's time to put
a coding standards file in the docs directory?

Anyway, I'll finish reviewing it tonight and commit it.

Thanks again for the patch,

Brian





Archive powered by MHonArc 2.6.24.

Top of Page