You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(28) |
Feb
(6) |
Mar
(13) |
Apr
(10) |
May
(12) |
Jun
(14) |
Jul
(12) |
Aug
|
Sep
(32) |
Oct
(8) |
Nov
(6) |
Dec
(25) |
2005 |
Jan
(3) |
Feb
(26) |
Mar
(1) |
Apr
(40) |
May
(6) |
Jun
(2) |
Jul
(9) |
Aug
(5) |
Sep
(24) |
Oct
(8) |
Nov
(21) |
Dec
(6) |
2006 |
Jan
(17) |
Feb
(10) |
Mar
(3) |
Apr
|
May
(18) |
Jun
(2) |
Jul
(9) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
(8) |
May
(2) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(29) |
Oct
(15) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(2) |
Feb
|
Mar
(6) |
Apr
(1) |
May
(4) |
Jun
(13) |
Jul
(1) |
Aug
(3) |
Sep
|
Oct
(5) |
Nov
(7) |
Dec
(1) |
2009 |
Jan
(9) |
Feb
(4) |
Mar
(2) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
(11) |
Oct
(4) |
Nov
|
Dec
(20) |
2010 |
Jan
(9) |
Feb
(1) |
Mar
(2) |
Apr
(8) |
May
(3) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2011 |
Jan
(3) |
Feb
(3) |
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(5) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(2) |
Jun
(10) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: summa p. <sum...@ho...> - 2010-06-18 04:40:00
|
Hi All. Can anyone help, how to connect vc++ to libodbc++????????. With Regards T.Boopathi Raja _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 |
From: summa p. <sum...@ho...> - 2010-06-17 10:12:41
|
Hi, I have some doubt in this libodbc++ project. I downloaded the project after how will i integrate the project to vc++ project. How will i call to libodbc++. can u tell me the steps briefly. I have vc++ project. I need to connect mysql database. Thanks With Regards T.Boopathi _________________________________________________________________ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 |
From: Mark K. <gre...@ma...> - 2010-05-04 05:53:03
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 That should not be a problem. I was concerned about some of the header style. I guess we could go with those compilers you listed as supported, then anything else as unsupported or untested? On May 3, 2010, at 6:40 PM, Pete wrote: > I guess changing: > > class DataStreamBase : public virtual ios { > > to > > class DataStreamBase : public virtual std::ios { > > shouldn't cause any problems as all we do is take it out of the compilers > hand to make assumptions. > > This compiles with gcc 4.2.4, VC 2005 and VC 2008. > > Pete > >> -----Original Message----- >> From: Mark Kromis [mailto:gre...@ma...] >> Sent: Friday, 30 April 2010 9:43 p.m. >> To: libodbc++ development mailing list >> Subject: Re: [libodbcxx-devel] Build problems (Ubuntu) >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> There is some legacy stuff in the code that is still there. The big >> question when upgrading the header is how far back do you want to support >> the compilers. For example VC6 has some problems with autoptr. I added >> that to get around a memory issue. >> >> One argument is that most modern compilers are free (vs2008, gcc4.4 >> etc...) and that we should stick with modern specs. >> If we keep one generation compatibility it should not affect too many >> people, but there will be some complaining that their compiler is not >> supported. >> >> So using <iostream> instead of <iostream.h> will break on old compilers. >> Blocking the header into a conditional with a ac_configure check is one >> option for unix systems, but then how to handle old windows compilers. >> >> Regards, >> Mark Kromis >> >> On Apr 29, 2010, at 11:50 PM, Pete wrote: >> >>> Thanks Buck, great help. >>> >>> Running autoreconf -i produced these messages: >>> >>> acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL >>> acinclude.m4:29: run info '(automake)Extending aclocal' >>> acinclude.m4:29: or see >>> http://sources.redhat.com/automake/automake.html#Extending-aclocal >>> acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL >>> acinclude.m4:29: run info '(automake)Extending aclocal' >>> acinclude.m4:29: or see >>> http://sources.redhat.com/automake/automake.html#Extending-aclocal >>> configure.ac:23: installing `./install-sh' >>> configure.ac:23: installing `./missing' >>> isql++/Makefile.am: installing `./depcomp' >>> >>> but at least I was able to run ./configure and thereafter the make and >> make >>> install steps. However, on my system, I got a compile error which I >> managed >>> to overcome by changing line src/datastream.h:86 form: >>> >>> class DataStreamBase : public virtual ios { >>> to: >>> class DataStreamBase : public virtual std::ios { >>> >>> Here is the error: >>> >>> g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include - >> I/usr/local/include >>> -DIN_ODBCXX -D_GNU_SOURCE -g -O2 -MT resultset.lo -MD -MP -MF >>> .deps/resultset.Tpo -c resultset.cpp -fPIC -DPIC -o .libs/resultset.o >>> In file included from /usr/include/c++/4.2/backward/streambuf.h:31, >>> from datastream.h:32, >>> from resultset.cpp:27: >>> /usr/include/c++/4.2/backward/backward_warning.h:32:2: warning: #warning >>> This file includes at least one deprecated or antiquated header. Please >>> consider using one of the 32 headers found in section 17.4.1.2 of the >> C++ >>> standard. Examples include substituting the <X> header for the <X.h> >> header >>> for C++ includes, or <iostream> instead of the deprecated header >>> <iostream.h>. To disable this warning use -Wno-deprecated. >>> In file included from resultset.cpp:27: >>> datastream.h:86: error: expected class-name before '{' token >>> datastream.h: In constructor >>> 'odbc::DataStream::DataStream(odbc::ErrorHandler*, void*, int, int, >>> SQLINTEGER&)': >>> [snip] >>> >>> I don't really want to update this in SVN until someone more experienced >>> with Unix builds can give the blessings. >>> >>>> -----Original Message----- >>>> From: Buck Huppmann [mailto:bu...@so...] >>>> Sent: Friday, 30 April 2010 2:47 p.m. >>>> To: pe...@ka... >>>> Subject: Re: [libodbcxx-devel] Build problems (Ubuntu) >>>> >>>> this is an ignorant response, so i'm replying off-list; feel free >>>> to confirm success to the list, if the below works and seems rea- >>>> sonable to you >>>> >>>> On Fri, Apr 30, 2010 at 01:39:03PM +1200, Pete wrote: >>>>> It's been a long time since I last built libodbc++ under Linux (Ubuntu >>>>> 8.04). >>>>> >>>>> I got the libodbc++ main trunk from the SourceForge SVN but struggled >>>> with >>>>> the first build step: >>>>> >>>>> ./configure >>>>> >>>>> because "configure" it isn't in SVN. I the tried to generate it using >>>>> autoconf (2.61) but got the following problems: >>>>> >>>>> configure.ac:23: error: possibly undefined macro: AM_INIT_AUTOMAKE >>>>> If this token and others are legitimate, please use >>>> m4_pattern_allow. >>>>> See the Autoconf documentation. >>>>> configure.ac:24: error: possibly undefined macro: AM_CONFIG_HEADER >>>>> configure.ac:36: error: possibly undefined macro: AM_ENABLE_SHARED >>>>> configure.ac:37: error: possibly undefined macro: AM_ENABLE_STATIC >>>>> configure.ac:56: error: possibly undefined macro: AM_PROG_LIBTOOL >>>>> configure.ac:57: error: possibly undefined macro: AC_C_LONG_LONG >>>>> configure.ac:89: error: possibly undefined macro: AC_CHECK_THREADS >>>>> configure.ac:106: error: possibly undefined macro: AM_CONDITIONAL >>>>> configure.ac:110: error: possibly undefined macro: AC_CHECK_ODBC >>>>> configure.ac:114: error: possibly undefined >>>> >>>> looks like a bunch of automake macros; probably need to run >>>> aclocal >>>> first >>>> >>>> i usually just run >>>> autoreconf -i >>>> or >>>> autoreconf -f -i >>>> when that doesn't work, and then i give up >>>> >>>> this all suppose you have autoreconf, aclocal, automake (and >>>> maybe autoheader, libtoolize, and whatever else autoreconf magic- >>>> ally keeps me from having to think about) >>> >>> >>> ------------------------------------------------------------------------ >> ------ >>> _______________________________________________ >>> libodbcxx-devel mailing list >>> lib...@li... >>> https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v2.0.9 (Darwin) >> >> iEYEARECAAYFAkvaphIACgkQ74ci1S6/F58blQCghDtpUAPCYQmzhHkvDom5lLQl >> YecAn1JBNUchK1m2TyZLx5uk1IssuCq+ >> =pkb/ >> -----END PGP SIGNATURE----- >> >> -------------------------------------------------------------------------- >> ---- >> _______________________________________________ >> libodbcxx-devel mailing list >> lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel > > > ------------------------------------------------------------------------------ > _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAkvfti0ACgkQ74ci1S6/F58czQCgncaYyCt0A5m1xagenYu5G7c2 YewAn0/fxtZhH9PbhhmMhILtw9/f5Qqd =lCNi -----END PGP SIGNATURE----- |
From: Pete <pe...@ka...> - 2010-05-03 22:42:15
|
I guess changing: class DataStreamBase : public virtual ios { to class DataStreamBase : public virtual std::ios { shouldn't cause any problems as all we do is take it out of the compilers hand to make assumptions. This compiles with gcc 4.2.4, VC 2005 and VC 2008. Pete > -----Original Message----- > From: Mark Kromis [mailto:gre...@ma...] > Sent: Friday, 30 April 2010 9:43 p.m. > To: libodbc++ development mailing list > Subject: Re: [libodbcxx-devel] Build problems (Ubuntu) > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > There is some legacy stuff in the code that is still there. The big > question when upgrading the header is how far back do you want to support > the compilers. For example VC6 has some problems with autoptr. I added > that to get around a memory issue. > > One argument is that most modern compilers are free (vs2008, gcc4.4 > etc...) and that we should stick with modern specs. > If we keep one generation compatibility it should not affect too many > people, but there will be some complaining that their compiler is not > supported. > > So using <iostream> instead of <iostream.h> will break on old compilers. > Blocking the header into a conditional with a ac_configure check is one > option for unix systems, but then how to handle old windows compilers. > > Regards, > Mark Kromis > > On Apr 29, 2010, at 11:50 PM, Pete wrote: > > > Thanks Buck, great help. > > > > Running autoreconf -i produced these messages: > > > > acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL > > acinclude.m4:29: run info '(automake)Extending aclocal' > > acinclude.m4:29: or see > > http://sources.redhat.com/automake/automake.html#Extending-aclocal > > acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL > > acinclude.m4:29: run info '(automake)Extending aclocal' > > acinclude.m4:29: or see > > http://sources.redhat.com/automake/automake.html#Extending-aclocal > > configure.ac:23: installing `./install-sh' > > configure.ac:23: installing `./missing' > > isql++/Makefile.am: installing `./depcomp' > > > > but at least I was able to run ./configure and thereafter the make and > make > > install steps. However, on my system, I got a compile error which I > managed > > to overcome by changing line src/datastream.h:86 form: > > > > class DataStreamBase : public virtual ios { > > to: > > class DataStreamBase : public virtual std::ios { > > > > Here is the error: > > > > g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include - > I/usr/local/include > > -DIN_ODBCXX -D_GNU_SOURCE -g -O2 -MT resultset.lo -MD -MP -MF > > .deps/resultset.Tpo -c resultset.cpp -fPIC -DPIC -o .libs/resultset.o > > In file included from /usr/include/c++/4.2/backward/streambuf.h:31, > > from datastream.h:32, > > from resultset.cpp:27: > > /usr/include/c++/4.2/backward/backward_warning.h:32:2: warning: #warning > > This file includes at least one deprecated or antiquated header. Please > > consider using one of the 32 headers found in section 17.4.1.2 of the > C++ > > standard. Examples include substituting the <X> header for the <X.h> > header > > for C++ includes, or <iostream> instead of the deprecated header > > <iostream.h>. To disable this warning use -Wno-deprecated. > > In file included from resultset.cpp:27: > > datastream.h:86: error: expected class-name before '{' token > > datastream.h: In constructor > > 'odbc::DataStream::DataStream(odbc::ErrorHandler*, void*, int, int, > > SQLINTEGER&)': > > [snip] > > > > I don't really want to update this in SVN until someone more experienced > > with Unix builds can give the blessings. > > > >> -----Original Message----- > >> From: Buck Huppmann [mailto:bu...@so...] > >> Sent: Friday, 30 April 2010 2:47 p.m. > >> To: pe...@ka... > >> Subject: Re: [libodbcxx-devel] Build problems (Ubuntu) > >> > >> this is an ignorant response, so i'm replying off-list; feel free > >> to confirm success to the list, if the below works and seems rea- > >> sonable to you > >> > >> On Fri, Apr 30, 2010 at 01:39:03PM +1200, Pete wrote: > >>> It's been a long time since I last built libodbc++ under Linux (Ubuntu > >>> 8.04). > >>> > >>> I got the libodbc++ main trunk from the SourceForge SVN but struggled > >> with > >>> the first build step: > >>> > >>> ./configure > >>> > >>> because "configure" it isn't in SVN. I the tried to generate it using > >>> autoconf (2.61) but got the following problems: > >>> > >>> configure.ac:23: error: possibly undefined macro: AM_INIT_AUTOMAKE > >>> If this token and others are legitimate, please use > >> m4_pattern_allow. > >>> See the Autoconf documentation. > >>> configure.ac:24: error: possibly undefined macro: AM_CONFIG_HEADER > >>> configure.ac:36: error: possibly undefined macro: AM_ENABLE_SHARED > >>> configure.ac:37: error: possibly undefined macro: AM_ENABLE_STATIC > >>> configure.ac:56: error: possibly undefined macro: AM_PROG_LIBTOOL > >>> configure.ac:57: error: possibly undefined macro: AC_C_LONG_LONG > >>> configure.ac:89: error: possibly undefined macro: AC_CHECK_THREADS > >>> configure.ac:106: error: possibly undefined macro: AM_CONDITIONAL > >>> configure.ac:110: error: possibly undefined macro: AC_CHECK_ODBC > >>> configure.ac:114: error: possibly undefined > >> > >> looks like a bunch of automake macros; probably need to run > >> aclocal > >> first > >> > >> i usually just run > >> autoreconf -i > >> or > >> autoreconf -f -i > >> when that doesn't work, and then i give up > >> > >> this all suppose you have autoreconf, aclocal, automake (and > >> maybe autoheader, libtoolize, and whatever else autoreconf magic- > >> ally keeps me from having to think about) > > > > > > ------------------------------------------------------------------------ > ------ > > _______________________________________________ > > libodbcxx-devel mailing list > > lib...@li... > > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (Darwin) > > iEYEARECAAYFAkvaphIACgkQ74ci1S6/F58blQCghDtpUAPCYQmzhHkvDom5lLQl > YecAn1JBNUchK1m2TyZLx5uk1IssuCq+ > =pkb/ > -----END PGP SIGNATURE----- > > -------------------------------------------------------------------------- > ---- > _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel |
From: Pete <pe...@ka...> - 2010-05-03 22:37:07
|
Hi Mark, I didn't know that. I simply followed these instructions: http://libodbcxx.sourceforge.net/libodbc++/INSTALL/installation.html#UNIX I guess they should be amended. Pete > -----Original Message----- > From: Mark Kromis [mailto:gre...@ma...] > Sent: Friday, 30 April 2010 8:36 p.m. > To: libodbc++ development mailing list > Subject: Re: [libodbcxx-devel] Build problems (Ubuntu) > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > configure is generated from the m4 files, so it should not be in the svn. > It is generated when the release files are made. > > There is a autogen.sh file that should generate all of the files that you > need, assuming you have all the necessary developer packages installed. > The configure errors that you show make me think that you may not have > some of the packages installed. > > The alternate is to use the cmake files, but I have not tested them under > posix (mac/linux/bsd) systems yet. > > Regards, > Mark Kromis > > > On Apr 29, 2010, at 9:39 PM, Pete wrote: > > > It's been a long time since I last built libodbc++ under Linux (Ubuntu > > 8.04). > > > > I got the libodbc++ main trunk from the SourceForge SVN but struggled > with > > the first build step: > > > > ./configure > > > > because "configure" it isn't in SVN. I the tried to generate it using > > autoconf (2.61) but got the following problems: > > > > configure.ac:23: error: possibly undefined macro: AM_INIT_AUTOMAKE > > If this token and others are legitimate, please use > m4_pattern_allow. > > See the Autoconf documentation. > > configure.ac:24: error: possibly undefined macro: AM_CONFIG_HEADER > > configure.ac:36: error: possibly undefined macro: AM_ENABLE_SHARED > > configure.ac:37: error: possibly undefined macro: AM_ENABLE_STATIC > > configure.ac:56: error: possibly undefined macro: AM_PROG_LIBTOOL > > configure.ac:57: error: possibly undefined macro: AC_C_LONG_LONG > > configure.ac:89: error: possibly undefined macro: AC_CHECK_THREADS > > configure.ac:106: error: possibly undefined macro: AM_CONDITIONAL > > configure.ac:110: error: possibly undefined macro: AC_CHECK_ODBC > > configure.ac:114: error: possibly undefined > > > > I do 99% of all programming under Windows and my knowledge of the Unix > build > > process is limited to say the least. > > > > If configure has been excluded deliberately from SVN, why don't we > update > > the Unix installation instruction on the web pages? If this was simply > an > > omission, can someone check this in please? > > > > Is there a quick fix the lets me move on in the meantime? > > > > Cheers > > Pete > > > > > > ------------------------------------------------------------------------ > ------ > > _______________________________________________ > > libodbcxx-devel mailing list > > lib...@li... > > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (Darwin) > > iEYEARECAAYFAkvaloQACgkQ74ci1S6/F5+6OQCeJGvH0wu9Fa3T2awUukS2ZXP4 > QdMAnRPAZkOsH9gTP1Bagber6CRAKMpS > =JC0I > -----END PGP SIGNATURE----- > > -------------------------------------------------------------------------- > ---- > _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel |
From: Mark K. <gre...@ma...> - 2010-04-30 09:43:18
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 There is some legacy stuff in the code that is still there. The big question when upgrading the header is how far back do you want to support the compilers. For example VC6 has some problems with autoptr. I added that to get around a memory issue. One argument is that most modern compilers are free (vs2008, gcc4.4 etc...) and that we should stick with modern specs. If we keep one generation compatibility it should not affect too many people, but there will be some complaining that their compiler is not supported. So using <iostream> instead of <iostream.h> will break on old compilers. Blocking the header into a conditional with a ac_configure check is one option for unix systems, but then how to handle old windows compilers. Regards, Mark Kromis On Apr 29, 2010, at 11:50 PM, Pete wrote: > Thanks Buck, great help. > > Running autoreconf -i produced these messages: > > acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL > acinclude.m4:29: run info '(automake)Extending aclocal' > acinclude.m4:29: or see > http://sources.redhat.com/automake/automake.html#Extending-aclocal > acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL > acinclude.m4:29: run info '(automake)Extending aclocal' > acinclude.m4:29: or see > http://sources.redhat.com/automake/automake.html#Extending-aclocal > configure.ac:23: installing `./install-sh' > configure.ac:23: installing `./missing' > isql++/Makefile.am: installing `./depcomp' > > but at least I was able to run ./configure and thereafter the make and make > install steps. However, on my system, I got a compile error which I managed > to overcome by changing line src/datastream.h:86 form: > > class DataStreamBase : public virtual ios { > to: > class DataStreamBase : public virtual std::ios { > > Here is the error: > > g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I/usr/local/include > -DIN_ODBCXX -D_GNU_SOURCE -g -O2 -MT resultset.lo -MD -MP -MF > .deps/resultset.Tpo -c resultset.cpp -fPIC -DPIC -o .libs/resultset.o > In file included from /usr/include/c++/4.2/backward/streambuf.h:31, > from datastream.h:32, > from resultset.cpp:27: > /usr/include/c++/4.2/backward/backward_warning.h:32:2: warning: #warning > This file includes at least one deprecated or antiquated header. Please > consider using one of the 32 headers found in section 17.4.1.2 of the C++ > standard. Examples include substituting the <X> header for the <X.h> header > for C++ includes, or <iostream> instead of the deprecated header > <iostream.h>. To disable this warning use -Wno-deprecated. > In file included from resultset.cpp:27: > datastream.h:86: error: expected class-name before '{' token > datastream.h: In constructor > 'odbc::DataStream::DataStream(odbc::ErrorHandler*, void*, int, int, > SQLINTEGER&)': > [snip] > > I don't really want to update this in SVN until someone more experienced > with Unix builds can give the blessings. > >> -----Original Message----- >> From: Buck Huppmann [mailto:bu...@so...] >> Sent: Friday, 30 April 2010 2:47 p.m. >> To: pe...@ka... >> Subject: Re: [libodbcxx-devel] Build problems (Ubuntu) >> >> this is an ignorant response, so i'm replying off-list; feel free >> to confirm success to the list, if the below works and seems rea- >> sonable to you >> >> On Fri, Apr 30, 2010 at 01:39:03PM +1200, Pete wrote: >>> It's been a long time since I last built libodbc++ under Linux (Ubuntu >>> 8.04). >>> >>> I got the libodbc++ main trunk from the SourceForge SVN but struggled >> with >>> the first build step: >>> >>> ./configure >>> >>> because "configure" it isn't in SVN. I the tried to generate it using >>> autoconf (2.61) but got the following problems: >>> >>> configure.ac:23: error: possibly undefined macro: AM_INIT_AUTOMAKE >>> If this token and others are legitimate, please use >> m4_pattern_allow. >>> See the Autoconf documentation. >>> configure.ac:24: error: possibly undefined macro: AM_CONFIG_HEADER >>> configure.ac:36: error: possibly undefined macro: AM_ENABLE_SHARED >>> configure.ac:37: error: possibly undefined macro: AM_ENABLE_STATIC >>> configure.ac:56: error: possibly undefined macro: AM_PROG_LIBTOOL >>> configure.ac:57: error: possibly undefined macro: AC_C_LONG_LONG >>> configure.ac:89: error: possibly undefined macro: AC_CHECK_THREADS >>> configure.ac:106: error: possibly undefined macro: AM_CONDITIONAL >>> configure.ac:110: error: possibly undefined macro: AC_CHECK_ODBC >>> configure.ac:114: error: possibly undefined >> >> looks like a bunch of automake macros; probably need to run >> aclocal >> first >> >> i usually just run >> autoreconf -i >> or >> autoreconf -f -i >> when that doesn't work, and then i give up >> >> this all suppose you have autoreconf, aclocal, automake (and >> maybe autoheader, libtoolize, and whatever else autoreconf magic- >> ally keeps me from having to think about) > > > ------------------------------------------------------------------------------ > _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAkvaphIACgkQ74ci1S6/F58blQCghDtpUAPCYQmzhHkvDom5lLQl YecAn1JBNUchK1m2TyZLx5uk1IssuCq+ =pkb/ -----END PGP SIGNATURE----- |
From: Mark K. <gre...@ma...> - 2010-04-30 09:28:16
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Updated m4/ac_check_odbc.m4 and acinclude.m4 to remove autoconfigure warnings. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAkvaoqgACgkQ74ci1S6/F59nGgCeKD5wykdQHE2RFNbfHUUT9JVT 2JwAoKMFC5oGgcktiyMk1HXusI+zVAue =RgUK -----END PGP SIGNATURE----- |
From: Mark K. <gre...@ma...> - 2010-04-30 08:36:37
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 configure is generated from the m4 files, so it should not be in the svn. It is generated when the release files are made. There is a autogen.sh file that should generate all of the files that you need, assuming you have all the necessary developer packages installed. The configure errors that you show make me think that you may not have some of the packages installed. The alternate is to use the cmake files, but I have not tested them under posix (mac/linux/bsd) systems yet. Regards, Mark Kromis On Apr 29, 2010, at 9:39 PM, Pete wrote: > It's been a long time since I last built libodbc++ under Linux (Ubuntu > 8.04). > > I got the libodbc++ main trunk from the SourceForge SVN but struggled with > the first build step: > > ./configure > > because "configure" it isn't in SVN. I the tried to generate it using > autoconf (2.61) but got the following problems: > > configure.ac:23: error: possibly undefined macro: AM_INIT_AUTOMAKE > If this token and others are legitimate, please use m4_pattern_allow. > See the Autoconf documentation. > configure.ac:24: error: possibly undefined macro: AM_CONFIG_HEADER > configure.ac:36: error: possibly undefined macro: AM_ENABLE_SHARED > configure.ac:37: error: possibly undefined macro: AM_ENABLE_STATIC > configure.ac:56: error: possibly undefined macro: AM_PROG_LIBTOOL > configure.ac:57: error: possibly undefined macro: AC_C_LONG_LONG > configure.ac:89: error: possibly undefined macro: AC_CHECK_THREADS > configure.ac:106: error: possibly undefined macro: AM_CONDITIONAL > configure.ac:110: error: possibly undefined macro: AC_CHECK_ODBC > configure.ac:114: error: possibly undefined > > I do 99% of all programming under Windows and my knowledge of the Unix build > process is limited to say the least. > > If configure has been excluded deliberately from SVN, why don't we update > the Unix installation instruction on the web pages? If this was simply an > omission, can someone check this in please? > > Is there a quick fix the lets me move on in the meantime? > > Cheers > Pete > > > ------------------------------------------------------------------------------ > _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAkvaloQACgkQ74ci1S6/F5+6OQCeJGvH0wu9Fa3T2awUukS2ZXP4 QdMAnRPAZkOsH9gTP1Bagber6CRAKMpS =JC0I -----END PGP SIGNATURE----- |
From: Pete <pe...@ka...> - 2010-04-30 03:52:04
|
Thanks Buck, great help. Running autoreconf -i produced these messages: acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL acinclude.m4:29: run info '(automake)Extending aclocal' acinclude.m4:29: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal acinclude.m4:29: warning: underquoted definition of AC_CHECK_CXX_STL acinclude.m4:29: run info '(automake)Extending aclocal' acinclude.m4:29: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal configure.ac:23: installing `./install-sh' configure.ac:23: installing `./missing' isql++/Makefile.am: installing `./depcomp' but at least I was able to run ./configure and thereafter the make and make install steps. However, on my system, I got a compile error which I managed to overcome by changing line src/datastream.h:86 form: class DataStreamBase : public virtual ios { to: class DataStreamBase : public virtual std::ios { Here is the error: g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I/usr/local/include -DIN_ODBCXX -D_GNU_SOURCE -g -O2 -MT resultset.lo -MD -MP -MF .deps/resultset.Tpo -c resultset.cpp -fPIC -DPIC -o .libs/resultset.o In file included from /usr/include/c++/4.2/backward/streambuf.h:31, from datastream.h:32, from resultset.cpp:27: /usr/include/c++/4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. In file included from resultset.cpp:27: datastream.h:86: error: expected class-name before '{' token datastream.h: In constructor 'odbc::DataStream::DataStream(odbc::ErrorHandler*, void*, int, int, SQLINTEGER&)': [snip] I don't really want to update this in SVN until someone more experienced with Unix builds can give the blessings. > -----Original Message----- > From: Buck Huppmann [mailto:bu...@so...] > Sent: Friday, 30 April 2010 2:47 p.m. > To: pe...@ka... > Subject: Re: [libodbcxx-devel] Build problems (Ubuntu) > > this is an ignorant response, so i'm replying off-list; feel free > to confirm success to the list, if the below works and seems rea- > sonable to you > > On Fri, Apr 30, 2010 at 01:39:03PM +1200, Pete wrote: > > It's been a long time since I last built libodbc++ under Linux (Ubuntu > > 8.04). > > > > I got the libodbc++ main trunk from the SourceForge SVN but struggled > with > > the first build step: > > > > ./configure > > > > because "configure" it isn't in SVN. I the tried to generate it using > > autoconf (2.61) but got the following problems: > > > > configure.ac:23: error: possibly undefined macro: AM_INIT_AUTOMAKE > > If this token and others are legitimate, please use > m4_pattern_allow. > > See the Autoconf documentation. > > configure.ac:24: error: possibly undefined macro: AM_CONFIG_HEADER > > configure.ac:36: error: possibly undefined macro: AM_ENABLE_SHARED > > configure.ac:37: error: possibly undefined macro: AM_ENABLE_STATIC > > configure.ac:56: error: possibly undefined macro: AM_PROG_LIBTOOL > > configure.ac:57: error: possibly undefined macro: AC_C_LONG_LONG > > configure.ac:89: error: possibly undefined macro: AC_CHECK_THREADS > > configure.ac:106: error: possibly undefined macro: AM_CONDITIONAL > > configure.ac:110: error: possibly undefined macro: AC_CHECK_ODBC > > configure.ac:114: error: possibly undefined > > looks like a bunch of automake macros; probably need to run > aclocal > first > > i usually just run > autoreconf -i > or > autoreconf -f -i > when that doesn't work, and then i give up > > this all suppose you have autoreconf, aclocal, automake (and > maybe autoheader, libtoolize, and whatever else autoreconf magic- > ally keeps me from having to think about) |
From: Pete <pe...@ka...> - 2010-04-30 01:40:56
|
It's been a long time since I last built libodbc++ under Linux (Ubuntu 8.04). I got the libodbc++ main trunk from the SourceForge SVN but struggled with the first build step: ./configure because "configure" it isn't in SVN. I the tried to generate it using autoconf (2.61) but got the following problems: configure.ac:23: error: possibly undefined macro: AM_INIT_AUTOMAKE If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:24: error: possibly undefined macro: AM_CONFIG_HEADER configure.ac:36: error: possibly undefined macro: AM_ENABLE_SHARED configure.ac:37: error: possibly undefined macro: AM_ENABLE_STATIC configure.ac:56: error: possibly undefined macro: AM_PROG_LIBTOOL configure.ac:57: error: possibly undefined macro: AC_C_LONG_LONG configure.ac:89: error: possibly undefined macro: AC_CHECK_THREADS configure.ac:106: error: possibly undefined macro: AM_CONDITIONAL configure.ac:110: error: possibly undefined macro: AC_CHECK_ODBC configure.ac:114: error: possibly undefined I do 99% of all programming under Windows and my knowledge of the Unix build process is limited to say the least. If configure has been excluded deliberately from SVN, why don't we update the Unix installation instruction on the web pages? If this was simply an omission, can someone check this in please? Is there a quick fix the lets me move on in the meantime? Cheers Pete |
From: Himawan, B. <BHi...@wm...> - 2010-04-19 14:04:11
|
I think I found the root cause. I built libodbc++ as a static lib. I then build a dll that uses the static lib. From what I've been reading, this cause a conflict with the standard c++ libraries. The static lib uses the non dll versions of the standard c++ libraries and the dll uses the dll version of it. When used the dll version of libodbc++, I don't have the problem anymore. Budyanto From: Pete [mailto:pe...@ka...] Sent: Friday, April 16, 2010 5:35 PM To: 'libodbc++ development mailing list' Subject: Re: [libodbcxx-devel] libodbc++ and sstream I think you might have a configuration problem. Please send the errors you're getting from the compiler/linker. Pete ________________________________ From: Himawan, Budyanto [mailto:BHi...@wm...] Sent: Saturday, 17 April 2010 2:10 a.m. To: lib...@li... Subject: [libodbcxx-devel] libodbc++ and sstream Hi when I use libodbc++ on windows, I have to specify /NODEFAULTLIB:libcmt /NODEFAULTLIB:msvcprt because there were symbols that seem to be redefined in libodbc++. However, when I do this, I can't use sstream. Apparently sstream is defined in one of those default libraries. Do you have a suggestion on how to get around this issue? Thanks Budyanto |
From: Pete <pe...@ka...> - 2010-04-16 23:10:07
|
I think you might have a configuration problem. Please send the errors you're getting from the compiler/linker. Pete _____ From: Himawan, Budyanto [mailto:BHi...@wm...] Sent: Saturday, 17 April 2010 2:10 a.m. To: lib...@li... Subject: [libodbcxx-devel] libodbc++ and sstream Hi when I use libodbc++ on windows, I have to specify /NODEFAULTLIB:libcmt /NODEFAULTLIB:msvcprt because there were symbols that seem to be redefined in libodbc++. However, when I do this, I can't use sstream. Apparently sstream is defined in one of those default libraries. Do you have a suggestion on how to get around this issue? Thanks Budyanto |
From: Himawan, B. <BHi...@wm...> - 2010-04-16 14:10:09
|
Hi when I use libodbc++ on windows, I have to specify /NODEFAULTLIB:libcmt /NODEFAULTLIB:msvcprt because there were symbols that seem to be redefined in libodbc++. However, when I do this, I can't use sstream. Apparently sstream is defined in one of those default libraries. Do you have a suggestion on how to get around this issue? Thanks Budyanto |
From: Pete <pe...@ka...> - 2010-03-08 20:43:32
|
AFAIK, this has been fixed in SVN in that SQL_DRIVER_NOPROMPT is the default option when establishing new connections. If you're using an older version of libodbc++, try calling the static DriverManager method: DriverManager::setDriverCompletion(SQL_DRIVER_NOPROMPT); before you create any connections. Pete -----Original Message----- From: Chris Masiewicz [mailto:cma...@ya...] Sent: Tuesday, 9 March 2010 4:53 a.m. To: lib...@li... Subject: [libodbcxx-devel] Managed C++ I just inherited a Windows C# application that uses odbc++ through a managed C++ library. If the password is wrong in the connection string, my C# application hangs. The previous developed believed that the odbc layer was trying to popup a dialog box, and this only happens when running code on top of the managed layer. Has anyone else encountered this problem? And was there a fix? Thanks Chris ---------------------------------------------------------------------------- -- Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ libodbcxx-devel mailing list lib...@li... https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel |
From: Chris M. <cma...@ya...> - 2010-03-08 15:53:17
|
I just inherited a Windows C# application that uses odbc++ through a managed C++ library. If the password is wrong in the connection string, my C# application hangs. The previous developed believed that the odbc layer was trying to popup a dialog box, and this only happens when running code on top of the managed layer. Has anyone else encountered this problem? And was there a fix? Thanks Chris |
From: Pete <pe...@ka...> - 2010-02-19 22:33:10
|
Has anyone here successfully built a 64-bit library of libodbc++? I did a build with Visual Studio 2008 Express under Windows 7 (64-bit) and tested this using the native client for Microsoft SLQ Server 2008. I found/fixed some minor issues in libodbc++. I'm now left with a really strange problem to do with streamed columns which sometimes work and sometimes not. I've been trying for a couple of days now to no avail working out what the cause might be (SQLGetData returns "07009 - Invalid Descriptor Index" when all parameters look perfect). Since the same code works flawlessly in a 32-bit environment it's most likely a tricky porting issue that might cause some data allocated by the ODBC driver to be overridden. If anybody is able/keen to help debug this I'll try to reduce the test program to the smallest possible level which still exhibits the problem. Pete |
From: Pete <pe...@ka...> - 2010-01-20 20:43:32
|
I fixed a small issue in src\resultsetmetadata.cpp at line 169 which caused a compile error in VC9 because the iterator type does not match the collection it is used to iterate over. The new version is 158. pete |
From: Mark K. <gre...@ma...> - 2010-01-11 05:26:40
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Test uploaded in R156 as tests/parameter-test.cpp On 2010/01/10, at 22:40, Matthew Clay wrote: > > Here is the updated test code I promised. It follows dbmetadata in how it connects to a datasource, but requires an additional sql statement that it prepares. It then prints the odbc/database parameter types of the prepared statement (if any), as well as the column names/column types of the result set. > > #include <odbc++/drivermanager.h> > #include <odbc++/connection.h> > #include <odbc++/preparedstatement.h> > #include <odbc++/resultset.h> > #include <odbc++/resultsetmetadata.h> > #include <odbc++/parametermetadata.h> > > #include <iostream> > #include <memory> > > using namespace odbc; > using namespace std; > > int main(int argc, char** argv) > { > if(argc!=3 && argc!=5) { > cerr << "Usage: " << argv[0] << " connect-string sql" << endl > << "or " << argv[0] << " dsn username password sql" << endl; > return 0; > } > > std::vector<ODBCXX_STRING> vargv(argc-1); > const size_t MAX_CHARS = 256; > for(int i=1;i<argc;++i) > { > ODBCXX_STRING& arg=vargv[i-1]; > #if defined(ODBCXX_UNICODE) > wchar_t buffer[MAX_CHARS]; > size_t len=mbstowcs(buffer,argv[i],MAX_CHARS); > if(0<len&&MAX_CHARS>len) > { > arg=buffer; > } > #else > arg=argv[i]; > #endif > } > > ODBCXX_STRING sql; > std::auto_ptr<Connection> con; > try { > if(argc==3) { > ODBCXX_COUT << ODBCXX_STRING_CONST("Connecting to ") << vargv[0] > << ODBCXX_STRING_CONST("...") << flush; > con=std::auto_ptr<Connection>(DriverManager::getConnection(vargv[0])); > sql = vargv[1]; > } else { > ODBCXX_COUT << ODBCXX_STRING_CONST("Connecting to dsn=") << vargv[0] > << ODBCXX_STRING_CONST(", uid=") << vargv[1] > << ODBCXX_STRING_CONST(", pwd=") << vargv[2] > << ODBCXX_STRING_CONST("...") << flush; > con=std::auto_ptr<Connection>(DriverManager::getConnection(vargv[0],vargv[1],vargv[2])); > sql = vargv[3]; > } > > ODBCXX_COUT << ODBCXX_STRING_CONST("\n") << ODBCXX_STRING_CONST("sql=") > << sql << ODBCXX_STRING_CONST("\n"); > > PreparedStatement* ps=con->prepareStatement(sql); > ParameterMetaData *pd = ps->getParameterMetaData(); > > int m = pd->getParameterCount(); > if (m) > { > ODBCXX_COUT << ODBCXX_STRING_CONST("parameter types (odbc/database):\n"); > for(int i=1; i<=m; ++i) > { > ODBCXX_COUT << ODBCXX_STRING_CONST("parameter ") << i << ODBCXX_STRING_CONST(": "); > ODBCXX_COUT << pd->getParameterType(i) << ODBCXX_STRING_CONST("/") > << pd->getParameterTypeName(i) << ODBCXX_STRING_CONST("\n"); > } > } > else > ODBCXX_COUT << ODBCXX_STRING_CONST("no parameters\n"); > > ODBCXX_COUT << ODBCXX_STRING_CONST("\n"); > > ResultSetMetaData* md=ps->getMetaData(); > int n = md->getColumnCount(); > if ( n ) { > ODBCXX_COUT << ODBCXX_STRING_CONST("result set (name/type):\n"); > for(int i=1; i<=n; ++i) { > ODBCXX_COUT << ODBCXX_STRING_CONST("column ") << i << ODBCXX_STRING_CONST(": "); > ODBCXX_COUT << md->getColumnName(i) << ODBCXX_STRING_CONST("/") > << md->getColumnType(i) << ODBCXX_STRING_CONST("\n"); > } > } > else > ODBCXX_COUT << ODBCXX_STRING_CONST("no columns\n"); > > ODBCXX_COUT << ODBCXX_STRING_CONST("\n"); > > } catch(SQLException& e) { > ODBCXX_CERR << endl << e.getMessage() << endl; > } > > return 0; > } > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAktKtogACgkQ74ci1S6/F58krgCgtMknfqHknFhwN/3IIRJphbFE K6UAn0fOiUessm/tiTafRaC/7pOcJhrf =W6LN -----END PGP SIGNATURE----- |
From: Matthew C. <mc...@ly...> - 2010-01-11 03:40:37
|
Here is the updated test code I promised. It follows dbmetadata in how it connects to a datasource, but requires an additional sql statement that it prepares. It then prints the odbc/database parameter types of the prepared statement (if any), as well as the column names/column types of the result set. #include <odbc++/drivermanager.h> #include <odbc++/connection.h> #include <odbc++/preparedstatement.h> #include <odbc++/resultset.h> #include <odbc++/resultsetmetadata.h> #include <odbc++/parametermetadata.h> #include <iostream> #include <memory> using namespace odbc; using namespace std; int main(int argc, char** argv) { if(argc!=3 && argc!=5) { cerr << "Usage: " << argv[0] << " connect-string sql" << endl << "or " << argv[0] << " dsn username password sql" << endl; return 0; } std::vector<ODBCXX_STRING> vargv(argc-1); const size_t MAX_CHARS = 256; for(int i=1;i<argc;++i) { ODBCXX_STRING& arg=vargv[i-1]; #if defined(ODBCXX_UNICODE) wchar_t buffer[MAX_CHARS]; size_t len=mbstowcs(buffer,argv[i],MAX_CHARS); if(0<len&&MAX_CHARS>len) { arg=buffer; } #else arg=argv[i]; #endif } ODBCXX_STRING sql; std::auto_ptr<Connection> con; try { if(argc==3) { ODBCXX_COUT << ODBCXX_STRING_CONST("Connecting to ") << vargv[0] << ODBCXX_STRING_CONST("...") << flush; con=std::auto_ptr<Connection>(DriverManager::getConnection(vargv[0])); sql = vargv[1]; } else { ODBCXX_COUT << ODBCXX_STRING_CONST("Connecting to dsn=") << vargv[0] << ODBCXX_STRING_CONST(", uid=") << vargv[1] << ODBCXX_STRING_CONST(", pwd=") << vargv[2] << ODBCXX_STRING_CONST("...") << flush; con=std::auto_ptr<Connection>(DriverManager::getConnection(vargv[0],vargv[1],vargv[2])); sql = vargv[3]; } ODBCXX_COUT << ODBCXX_STRING_CONST("\n") << ODBCXX_STRING_CONST("sql=") << sql << ODBCXX_STRING_CONST("\n"); PreparedStatement* ps=con->prepareStatement(sql); ParameterMetaData *pd = ps->getParameterMetaData(); int m = pd->getParameterCount(); if (m) { ODBCXX_COUT << ODBCXX_STRING_CONST("parameter types (odbc/database):\n"); for(int i=1; i<=m; ++i) { ODBCXX_COUT << ODBCXX_STRING_CONST("parameter ") << i << ODBCXX_STRING_CONST(": "); ODBCXX_COUT << pd->getParameterType(i) << ODBCXX_STRING_CONST("/") << pd->getParameterTypeName(i) << ODBCXX_STRING_CONST("\n"); } } else ODBCXX_COUT << ODBCXX_STRING_CONST("no parameters\n"); ODBCXX_COUT << ODBCXX_STRING_CONST("\n"); ResultSetMetaData* md=ps->getMetaData(); int n = md->getColumnCount(); if ( n ) { ODBCXX_COUT << ODBCXX_STRING_CONST("result set (name/type):\n"); for(int i=1; i<=n; ++i) { ODBCXX_COUT << ODBCXX_STRING_CONST("column ") << i << ODBCXX_STRING_CONST(": "); ODBCXX_COUT << md->getColumnName(i) << ODBCXX_STRING_CONST("/") << md->getColumnType(i) << ODBCXX_STRING_CONST("\n"); } } else ODBCXX_COUT << ODBCXX_STRING_CONST("no columns\n"); ODBCXX_COUT << ODBCXX_STRING_CONST("\n"); } catch(SQLException& e) { ODBCXX_CERR << endl << e.getMessage() << endl; } return 0; } |
From: Mark K. <gre...@ma...> - 2010-01-10 11:02:01
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 If you have any unit tests, would you like to donate them, so that other people could use them as reference at least? Thanks Regards, Mark Kromis On 2010/01/09, at 23:48, Matthew Clay wrote: > > I believe I have updated libodbc++-2.5 with the cstdio/EOF patch to more fully support preparedstatement/resultsetmetadata functionality. I've also added preparedstatement/parametermetadata functionality, which was missing. Lastly, for win32, I've also disabled the annoying win32 warning messages about using standard libraries features. > > I've also added a solution, several projects and tests for these new features. I have not included these in the patches for several reasons. First, I do not know how to add a project/solution to a patch, nor would I imagine anyone would want my .suo or .ncb files. Second, for the tests, I used a project and not a makefile, so I did not include these. > > Lastly, I did not update the makefile (or configuration system) as I have not been using it. But obviously, the parametermetadata.cpp file (and .h dependency) needs to be added to it. > > diff -crBN libodbc++-0.2.5-orig/include/odbc++/config-win32.h libodbc++-0.2.5/include/odbc++/config-win32.h > *** libodbc++-0.2.5-orig/include/odbc++/config-win32.h Sat Mar 7 00:41:10 2009 > --- libodbc++-0.2.5/include/odbc++/config-win32.h Thu Dec 17 21:54:41 2009 > *************** > *** 17,26 **** > #define ODBCXX_HAVE_SET > #define ODBCXX_HAVE_VECTOR > > - > #define ODBCXX_ENABLE_THREADS > > #if defined(_MSC_VER) > // MSVC has a rather compliant CXX lib > # define ODBCXX_HAVE_ISO_CXXLIB > > --- 17,28 ---- > #define ODBCXX_HAVE_SET > #define ODBCXX_HAVE_VECTOR > > #define ODBCXX_ENABLE_THREADS > > #if defined(_MSC_VER) > + #pragma warning( disable : 4251 4275 4786 4996) > + # define _CRT_SECURE_NO_WARNING > + > // MSVC has a rather compliant CXX lib > # define ODBCXX_HAVE_ISO_CXXLIB > > diff -crBN libodbc++-0.2.5-orig/include/odbc++/parametermetadata.h libodbc++-0.2.5/include/odbc++/parametermetadata.h > *** libodbc++-0.2.5-orig/include/odbc++/parametermetadata.h Wed Dec 31 18:00:00 1969 > --- libodbc++-0.2.5/include/odbc++/parametermetadata.h Sat Jan 9 19:23:57 2010 > *************** > *** 0 **** > --- 1,72 ---- > + /* > + This file is part of libodbc++. > + > + This library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Library General Public > + License as published by the Free Software Foundation; either > + version 2 of the License, or (at your option) any later version. > + > + This library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Library General Public License for more details. > + > + You should have received a copy of the GNU Library General Public License > + along with this library; see the file COPYING. If not, write to > + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, > + Boston, MA 02111-1307, USA. > + */ > + > + #ifndef __ODBCXX_PARAMETERMETADATA_H > + #define __ODBCXX_PARAMETERMETADATA_H > + > + #include <odbc++/preparedstatement.h> > + > + namespace odbc { > + > + class ODBCXX_EXPORT ParameterMetaData { > + friend class PreparedStatement; > + > + private: > + PreparedStatement *stmt_; > + > + ParameterMetaData( PreparedStatement *ps ); > + > + ResultSet* _getTypeInfo(SQLSMALLINT type); > + > + public: > + /** Get the number of parameters in the prepared statement > + */ > + int getParameterCount(); > + > + /** Get the designated parameter's mode > + */ > + int getParameterMode(int param); > + > + /** Get the designated parameter's SQL type > + */ > + int getParameterType(int param); > + > + /** Get the designated parameter's database-specific type name > + */ > + ODBCXX_STRING getParameterTypeName(int param); > + > + /** Get the designated parameter's specified column size > + */ > + int getPrecision(int param); > + > + /** Get the designated parameter's number of digits to right of the decimal point > + */ > + int getScale(int param); > + > + /** Check if null values are allowed in the designated parameter > + */ > + int isNullable(int param); > + > + /** Check if values for the designated parameter can be signed numbers > + */ > + bool isSigned(int param) { return 0; } > + }; > + } > + > + #endif > diff -crBN libodbc++-0.2.5-orig/include/odbc++/preparedstatement.h libodbc++-0.2.5/include/odbc++/preparedstatement.h > *** libodbc++-0.2.5-orig/include/odbc++/preparedstatement.h Sat Mar 7 00:41:10 2009 > --- libodbc++-0.2.5/include/odbc++/preparedstatement.h Mon Dec 28 21:41:10 2009 > *************** > *** 26,31 **** > --- 26,32 ---- > #include <odbc++/setup.h> > #include <odbc++/types.h> > #include <odbc++/statement.h> > + #include <odbc++/resultsetmetadata.h> > > #if defined(ODBCXX_HAVE_ISO_CXXLIB) > # include <iosfwd> > *************** > *** 38,43 **** > --- 39,45 ---- > namespace odbc { > > class Rowset; > + class ParameterMetaData; > > /** A prepared statement. > * > *************** > *** 62,67 **** > --- 64,70 ---- > > class ODBCXX_EXPORT PreparedStatement : public Statement { > friend class Connection; > + friend class ParameterMetaData; > > private: > void _prepare(); > *************** > *** 69,74 **** > --- 72,79 ---- > > protected: > ODBCXX_STRING sql_; > + ParameterMetaData* parameterMetaData_; > + > //here we store the parameters > Rowset* rowset_; > size_t numParams_; > *************** > *** 120,125 **** > --- 125,134 ---- > /** Executes this statement, assuming it returns an update count */ > int executeUpdate(); > > + ResultSetMetaData* getMetaData(); > + > + ParameterMetaData* getParameterMetaData(); > + > /** Sets a parameter value to a double > * @param idx The parameter index, starting at 1 > * @param val The value to set > *************** > *** 223,229 **** > void setNull(int idx, int sqlType); > }; > > - > } // namespace odbc > > #endif // __ODBCXX_PREPAREDSTATEMENT_H > --- 232,237 ---- > diff -crBN libodbc++-0.2.5-orig/include/odbc++/resultset.h libodbc++-0.2.5/include/odbc++/resultset.h > *** libodbc++-0.2.5-orig/include/odbc++/resultset.h Sat Mar 7 00:41:10 2009 > --- libodbc++-0.2.5/include/odbc++/resultset.h Mon Dec 28 21:13:56 2009 > *************** > *** 32,42 **** > --- 32,44 ---- > > class ResultSetMetaData; > class Statement; > + class PreparedStatement; > class Rowset; > > /** A result set */ > class ODBCXX_EXPORT ResultSet : public ErrorHandler { > friend class Statement; > + friend class PreparedStatement; > friend class ResultSetMetaData; > > private: > *************** > *** 72,78 **** > // Flag to determine if we can lazyfetch data > bool supportsGetDataAnyOrder_; > > ! ResultSet(Statement* stmt,SQLHSTMT hstmt, bool ownStmt); > > //driver info > const DriverInfo* _getDriverInfo() const { > --- 74,84 ---- > // Flag to determine if we can lazyfetch data > bool supportsGetDataAnyOrder_; > > ! enum ResultSetType { FROM_UKNOWN, FROM_QUERY, FROM_METADATA }; > ! > ! ResultSetType resultSetType_; > ! > ! ResultSet(Statement* stmt,SQLHSTMT hstmt, bool ownStmt,ResultSetType rsType); > > //driver info > const DriverInfo* _getDriverInfo() const { > diff -crBN libodbc++-0.2.5-orig/include/odbc++/statement.h libodbc++-0.2.5/include/odbc++/statement.h > *** libodbc++-0.2.5-orig/include/odbc++/statement.h Fri Jan 13 07:19:26 2006 > --- libodbc++-0.2.5/include/odbc++/statement.h Fri Jan 1 19:03:39 2010 > *************** > *** 31,42 **** > --- 31,45 ---- > > class ResultSet; > class DriverInfo; > + class ResultSetMetaData; > + class ParameterMetaData; > > /** A simple non-prepared statement */ > class ODBCXX_EXPORT Statement : public ErrorHandler { > friend class Connection; > friend class ResultSet; > friend class DatabaseMetaData; > + friend class ParameterMetaData; > > protected: > Connection* connection_; > *************** > *** 47,54 **** > --- 50,63 ---- > return connection_->_getDriverInfo(); > } > > + void _registerMetaDataResultSet(ResultSet* rs); > + void _unregisterMetaDataResultSet(ResultSet* rs); > + > + ResultSet* _getMetaDataResultSet(); > + > private: > ResultSet* currentResultSet_; > + ResultSet* metaDataResultSet_; > > int fetchSize_; > int resultSetType_; > *************** > *** 69,75 **** > > void _applyResultSetType(); > > ! ResultSet* _getTypeInfo(); > ResultSet* _getTables(const ODBCXX_STRING& catalog, > const ODBCXX_STRING& schema, > const ODBCXX_STRING& tableName, > --- 78,84 ---- > > void _applyResultSetType(); > > ! ResultSet* _getTypeInfo(SQLSMALLINT dataType=SQL_ALL_TYPES); > ResultSet* _getTables(const ODBCXX_STRING& catalog, > const ODBCXX_STRING& schema, > const ODBCXX_STRING& tableName, > diff -crBN libodbc++-0.2.5-orig/src/connection.cpp libodbc++-0.2.5/src/connection.cpp > *** libodbc++-0.2.5-orig/src/connection.cpp Tue Jan 6 05:20:06 2009 > --- libodbc++-0.2.5/src/connection.cpp Sat Dec 19 15:31:04 2009 > *************** > *** 213,228 **** > driverInfo_=ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) DriverInfo(this); > } > > void Connection::_connect(const ODBCXX_STRING& connectString, SQLUSMALLINT drvcompl) > { > ! ODBCXX_SQLCHAR dummy[256]; > SQLSMALLINT dummySize; > SQLRETURN r=SQLDriverConnect(hdbc_, > 0, > (ODBCXX_SQLCHAR*) ODBCXX_STRING_DATA(connectString), > ODBCXX_STRING_LEN(connectString), > dummy, > ! 255, > &dummySize, > drvcompl); > > --- 213,229 ---- > driverInfo_=ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) DriverInfo(this); > } > > + #define DUMMY_SIZE 2048 > void Connection::_connect(const ODBCXX_STRING& connectString, SQLUSMALLINT drvcompl) > { > ! ODBCXX_SQLCHAR dummy[DUMMY_SIZE]; > SQLSMALLINT dummySize; > SQLRETURN r=SQLDriverConnect(hdbc_, > 0, > (ODBCXX_SQLCHAR*) ODBCXX_STRING_DATA(connectString), > ODBCXX_STRING_LEN(connectString), > dummy, > ! DUMMY_SIZE, > &dummySize, > drvcompl); > > diff -crBN libodbc++-0.2.5-orig/src/datahandler.cpp libodbc++-0.2.5/src/datahandler.cpp > *** libodbc++-0.2.5-orig/src/datahandler.cpp Thu Mar 5 07:23:22 2009 > --- libodbc++-0.2.5/src/datahandler.cpp Wed Dec 23 19:35:35 2009 > *************** > *** 156,168 **** > > DataHandler::DataHandler(unsigned int& cr, size_t rows, > int sqlType, int precision, int scale, > ! bool use3) > :currentRow_(cr),rows_(rows), > buffer_(NULL),bufferSize_(0), dataStatus_(NULL), > isStreamed_(false),stream_(NULL),ownStream_(false), > sqlType_(sqlType), > precision_(precision), > scale_(scale), > use3_(use3) > #ifdef CACHE_STREAMED_DATA > #endif // CACHE_STREAMED_DATA > --- 156,169 ---- > > DataHandler::DataHandler(unsigned int& cr, size_t rows, > int sqlType, int precision, int scale, > ! int nullable,bool use3) > :currentRow_(cr),rows_(rows), > buffer_(NULL),bufferSize_(0), dataStatus_(NULL), > isStreamed_(false),stream_(NULL),ownStream_(false), > sqlType_(sqlType), > precision_(precision), > scale_(scale), > + nullable_(nullable), > use3_(use3) > #ifdef CACHE_STREAMED_DATA > #endif // CACHE_STREAMED_DATA > diff -crBN libodbc++-0.2.5-orig/src/datahandler.h libodbc++-0.2.5/src/datahandler.h > *** libodbc++-0.2.5-orig/src/datahandler.h Thu Mar 5 07:23:22 2009 > --- libodbc++-0.2.5/src/datahandler.h Wed Dec 23 20:28:48 2009 > *************** > *** 36,45 **** > --- 36,51 ---- > > namespace odbc { > > + class ResultSet; > + class PreparedStatement; > + class Rowset; > + class ParameterMetaData; > + > class ODBCXX_EXPORT DataHandler { > friend class ResultSet; > friend class PreparedStatement; > friend class Rowset; > + friend class ParameterMetaData; > > private: > > *************** > *** 57,62 **** > --- 63,69 ---- > int cType_; > int precision_; > int scale_; > + int nullable_; > bool use3_; > > > *************** > *** 99,105 **** > > public: > DataHandler(unsigned int& cr, size_t rows, > ! int sqlType, int precision, int scale, bool use3); > > ~DataHandler() { > this->resetStream(); > --- 106,113 ---- > > public: > DataHandler(unsigned int& cr, size_t rows, > ! int sqlType, int precision, int scale, int nullable, > ! bool use3); > > ~DataHandler() { > this->resetStream(); > *************** > *** 204,212 **** > unsigned int currentRow_; > bool use3_; > > ! DataHandler* _createColumn(int sqlType, int precision, int scale) { > return ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) DataHandler > ! (currentRow_,rows_,sqlType,precision,scale,use3_); > } > > public: > --- 212,220 ---- > unsigned int currentRow_; > bool use3_; > > ! DataHandler* _createColumn(int sqlType, int precision, int scale, int nullable) { > return ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) DataHandler > ! (currentRow_,rows_,sqlType,precision,scale,nullable,use3_); > } > > public: > *************** > *** 225,239 **** > } > } > > ! void addColumn(int sqlType, int precision, int scale) { > dataHandlers_.insert(dataHandlers_.end(), > ! this->_createColumn(sqlType,precision,scale)); > } > > ! void replaceColumn(int idx, int sqlType, int precision, int scale) { > assert(idx>0 && idx<=(int)dataHandlers_.size()); > > ! DataHandler* h=this->_createColumn(sqlType,precision,scale); > ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) dataHandlers_[idx-1]; > dataHandlers_[idx-1]=h; > } > --- 233,247 ---- > } > } > > ! void addColumn(int sqlType, int precision, int scale, int nullable) { > dataHandlers_.insert(dataHandlers_.end(), > ! this->_createColumn(sqlType,precision,scale,nullable)); > } > > ! void replaceColumn(int idx, int sqlType, int precision, int scale, int nullable) { > assert(idx>0 && idx<=(int)dataHandlers_.size()); > > ! DataHandler* h=this->_createColumn(sqlType,precision,scale,nullable); > ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) dataHandlers_[idx-1]; > dataHandlers_[idx-1]=h; > } > diff -crBN libodbc++-0.2.5-orig/src/drivermanager.cpp libodbc++-0.2.5/src/drivermanager.cpp > *** libodbc++-0.2.5-orig/src/drivermanager.cpp Wed Jan 7 23:19:24 2009 > --- libodbc++-0.2.5/src/drivermanager.cpp Fri Dec 18 22:51:16 2009 > *************** > *** 30,36 **** > > SQLHENV DriverManager::henv_=SQL_NULL_HENV; > std::auto_ptr<ErrorHandler> DriverManager::eh_ = auto_ptr<ErrorHandler>(); > ! SQLUSMALLINT DriverManager::driverCompletion_ = SQL_DRIVER_COMPLETE; > > //-1 means don't touch, 0 means wait forever, >0 means set it for every opened > //connection > --- 30,37 ---- > > SQLHENV DriverManager::henv_=SQL_NULL_HENV; > std::auto_ptr<ErrorHandler> DriverManager::eh_ = auto_ptr<ErrorHandler>(); > ! // SQLUSMALLINT DriverManager::driverCompletion_ = SQL_DRIVER_COMPLETE; > ! SQLUSMALLINT DriverManager::driverCompletion_ = SQL_DRIVER_NOPROMPT; > > //-1 means don't touch, 0 means wait forever, >0 means set it for every opened > //connection > diff -crBN libodbc++-0.2.5-orig/src/parametermetadata.cpp libodbc++-0.2.5/src/parametermetadata.cpp > *** libodbc++-0.2.5-orig/src/parametermetadata.cpp Wed Dec 31 18:00:00 1969 > --- libodbc++-0.2.5/src/parametermetadata.cpp Fri Jan 1 20:43:50 2010 > *************** > *** 0 **** > --- 1,71 ---- > + #include <odbc++/parametermetadata.h> > + #include <odbc++/databasemetadata.h> > + #include "datahandler.h" > + > + namespace odbc { > + > + ParameterMetaData::ParameterMetaData( PreparedStatement *ps ) : stmt_(ps) { } > + > + int ParameterMetaData::getParameterCount() { return stmt_->numParams_; } > + > + int ParameterMetaData::getParameterMode(int param) { return stmt_->directions_[param]; } > + > + int ParameterMetaData::getParameterType(int param) { return stmt_->rowset_->getColumn(param)->sqlType_; } > + > + ResultSet *ParameterMetaData::_getTypeInfo(SQLSMALLINT type) > + { > + Connection* conn = stmt_->getConnection(); > + Statement* stmt = conn->createStatement(); > + > + try { > + return stmt->_getTypeInfo(type); > + } catch(...) { > + ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) stmt; > + throw; > + } > + } > + > + ODBCXX_STRING ParameterMetaData::getParameterTypeName(int param) > + { > + ODBCXX_STRING result; > + int odbcType = this->getParameterType(param); > + Connection *cn = this->stmt_->getConnection(); > + ResultSet *typeInfo = this->_getTypeInfo(odbcType); > + > + if (typeInfo->next()) > + { > + result = typeInfo->getString(1); > + } > + > + ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) typeInfo; > + > + return result; > + #if 0 > + // untested -- I imagine data types can be added, but this > + // could be used to cache the type info result set and then > + // refer to it > + > + if ( typeInfo_ == 0 ) > + { > + DatabaseMetaData *md = cn->getMetaData(); > + typeInfo_ = md->getTypeInfo(SQL_ALL_TYPES); > + } > + > + for(; typeInfo_->first(); typeInfo_->next()) { > + if (typeInfo_->getShort(2) == odbcType) > + { > + result = typeInfo_->getString(1); > + } > + } > + > + return result; > + #endif > + } > + > + int ParameterMetaData::getPrecision(int param) { return stmt_->rowset_->getColumn(param)->precision_; } > + > + int ParameterMetaData::getScale(int param) { return stmt_->rowset_->getColumn(param)->scale_; } > + > + int ParameterMetaData::isNullable(int param) { return stmt_->rowset_->getColumn(param)->nullable_; } > + > + } > diff -crBN libodbc++-0.2.5-orig/src/preparedstatement.cpp libodbc++-0.2.5/src/preparedstatement.cpp > *** libodbc++-0.2.5-orig/src/preparedstatement.cpp Thu Mar 5 07:23:22 2009 > --- libodbc++-0.2.5/src/preparedstatement.cpp Tue Dec 29 22:08:50 2009 > *************** > *** 33,38 **** > --- 33,39 ---- > #include "datahandler.h" > #include "driverinfo.h" > #include "dtconv.h" > + #include <odbc++/parametermetadata.h> > > #if defined(ODBCXX_QT) > # include <qiodevice.h> > *************** > *** 64,70 **** > rowset_(ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) Rowset(1,ODBC3_DC(true,false))), //always one row for now > numParams_(0), > defaultDirection_(defaultDirection), > ! paramsBound_(false) > { > this->_prepare(); > this->_setupParams(); > --- 65,72 ---- > rowset_(ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) Rowset(1,ODBC3_DC(true,false))), //always one row for now > numParams_(0), > defaultDirection_(defaultDirection), > ! paramsBound_(false), > ! parameterMetaData_(0) > { > this->_prepare(); > this->_setupParams(); > *************** > *** 72,77 **** > --- 74,81 ---- > > PreparedStatement::~PreparedStatement() > { > + ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) parameterMetaData_; > + > if(paramsBound_) { > this->_unbindParams(); > } > *************** > *** 112,118 **** > } > > // just add a column > ! rowset_->addColumn(allowed[0],defPrec,defScale); > directions_.push_back(defaultDirection_); > numParams_++; > > --- 116,122 ---- > } > > // just add a column > ! rowset_->addColumn(allowed[0],defPrec,defScale,0); > directions_.push_back(defaultDirection_); > numParams_++; > > *************** > *** 144,150 **** > // the parameters > this->_unbindParams(); > } > ! rowset_->replaceColumn(idx,allowed[0],defPrec,defScale); > } > } > > --- 148,154 ---- > // the parameters > this->_unbindParams(); > } > ! rowset_->replaceColumn(idx,allowed[0],defPrec,defScale,0); > } > } > > *************** > *** 182,194 **** > prec=DataHandler::defaultPrecisionFor(sqlType); > } > > ! rowset_->addColumn(sqlType,prec,scale); > directions_.push_back(defaultDirection_); > } > } else { > // default all parameters to VARCHAR(255) > for(size_t i=0; i<numParams_; i++) { > ! rowset_->addColumn(Types::VARCHAR,255,0); > directions_.push_back(defaultDirection_); > } > } > --- 186,198 ---- > prec=DataHandler::defaultPrecisionFor(sqlType); > } > > ! rowset_->addColumn(sqlType,prec,scale,nullable); > directions_.push_back(defaultDirection_); > } > } else { > // default all parameters to VARCHAR(255) > for(size_t i=0; i<numParams_; i++) { > ! rowset_->addColumn(Types::VARCHAR,255,0,0); > directions_.push_back(defaultDirection_); > } > } > *************** > *** 378,383 **** > --- 382,408 ---- > } > } > > + ResultSetMetaData* PreparedStatement::getMetaData() > + { > + ResultSet *rs = this->_getMetaDataResultSet(); > + > + if ( rs == 0 ) > + { > + rs = ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) ResultSet(this,hstmt_,false,ResultSet::FROM_METADATA); > + this->_registerMetaDataResultSet(rs); > + } > + > + return rs->getMetaData(); > + } > + > + ParameterMetaData* PreparedStatement::getParameterMetaData() > + { > + if (parameterMetaData_==0) > + parameterMetaData_ = ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) ParameterMetaData(this); > + > + return parameterMetaData_; > + } > + > void PreparedStatement::setNull(int idx, int sqlType) > { > int defPrec=DataHandler::defaultPrecisionFor(sqlType); > diff -crBN libodbc++-0.2.5-orig/src/resultset.cpp libodbc++-0.2.5/src/resultset.cpp > *** libodbc++-0.2.5-orig/src/resultset.cpp Sun Apr 26 01:19:10 2009 > --- libodbc++-0.2.5/src/resultset.cpp Tue Dec 29 20:54:34 2009 > *************** > *** 143,149 **** > } while(false) > > > ! ResultSet::ResultSet(Statement* stmt, SQLHSTMT hstmt, bool ownStmt) > :statement_(stmt), > hstmt_(hstmt), > ownStatement_(ownStmt), > --- 143,149 ---- > } while(false) > > > ! ResultSet::ResultSet(Statement* stmt, SQLHSTMT hstmt, bool ownStmt, ResultSetType rsType) > :statement_(stmt), > hstmt_(hstmt), > ownStatement_(ownStmt), > *************** > *** 156,162 **** > streamedColsBound_(false), > bindPos_(0), > location_(BEFORE_FIRST), > ! supportsGetDataAnyOrder_(false) > { > metaData_=ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) ResultSetMetaData(this); > > --- 156,163 ---- > streamedColsBound_(false), > bindPos_(0), > location_(BEFORE_FIRST), > ! supportsGetDataAnyOrder_(false), > ! resultSetType_(rsType) > { > metaData_=ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) ResultSetMetaData(this); > > *************** > *** 223,229 **** > ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) rowset_; > delete[] rowStatus_; > ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) metaData_; > ! statement_->_unregisterResultSet(this); > > //if we own the statement, nuke it > if(ownStatement_) { > --- 224,234 ---- > ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) rowset_; > delete[] rowStatus_; > ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) metaData_; > ! > ! if ( resultSetType_ == FROM_QUERY ) > ! statement_->_unregisterResultSet(this); > ! else if ( resultSetType_ == FROM_METADATA ) > ! statement_->_unregisterMetaDataResultSet(this); > > //if we own the statement, nuke it > if(ownStatement_) { > *************** > *** 319,325 **** > > rowset_->addColumn(metaData_->getColumnType(i), > realprec, > ! metaData_->getScale(i)); > } > } > > --- 324,331 ---- > > rowset_->addColumn(metaData_->getColumnType(i), > realprec, > ! metaData_->getScale(i), > ! metaData_->isNullable(i)); > } > } > > diff -crBN libodbc++-0.2.5-orig/src/statement.cpp libodbc++-0.2.5/src/statement.cpp > *** libodbc++-0.2.5-orig/src/statement.cpp Tue Jan 6 05:20:06 2009 > --- libodbc++-0.2.5/src/statement.cpp Wed Dec 30 21:42:33 2009 > *************** > *** 22,27 **** > --- 22,28 ---- > #include <odbc++/statement.h> > #include <odbc++/resultset.h> > #include <odbc++/connection.h> > + #include <odbc++/resultsetmetadata.h> > #include "driverinfo.h" > > #include "dtconv.h" > *************** > *** 38,44 **** > fetchSize_(SQL_ROWSET_SIZE_DEFAULT), > resultSetType_(resultSetType), > resultSetConcurrency_(resultSetConcurrency), > ! state_(STATE_CLOSED) > { > try { > > --- 39,46 ---- > fetchSize_(SQL_ROWSET_SIZE_DEFAULT), > resultSetType_(resultSetType), > resultSetConcurrency_(resultSetConcurrency), > ! state_(STATE_CLOSED), > ! metaDataResultSet_(0) > { > try { > > *************** > *** 57,62 **** > --- 59,66 ---- > > Statement::~Statement() > { > + ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) metaDataResultSet_; > + > if(currentResultSet_!=NULL) { > currentResultSet_->ownStatement_=false; > ODBCXX_OPERATOR_DELETE_DEBUG(__FILE__, __LINE__) currentResultSet_; > *************** > *** 86,91 **** > --- 90,111 ---- > currentResultSet_=NULL; > } > > + void Statement::_registerMetaDataResultSet(ResultSet* rs) > + { > + assert(metaDataResultSet_==NULL); > + metaDataResultSet_=rs; > + } > + > + void Statement::_unregisterMetaDataResultSet(ResultSet* rs) > + { > + assert(metaDataResultSet_==rs); > + metaDataResultSet_=NULL; > + } > + > + ResultSet *Statement::_getMetaDataResultSet() > + { > + return metaDataResultSet_; > + } > > //protected > SQLUINTEGER Statement::_getUIntegerOption(SQLINTEGER optnum) > *************** > *** 298,304 **** > //protected > ResultSet* Statement::_getResultSet(bool hideMe) > { > ! ResultSet* rs=ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) ResultSet(this,hstmt_,hideMe); > this->_registerResultSet(rs); > return rs; > } > --- 318,324 ---- > //protected > ResultSet* Statement::_getResultSet(bool hideMe) > { > ! ResultSet* rs=ODBCXX_OPERATOR_NEW_DEBUG(__FILE__, __LINE__) ResultSet(this,hstmt_,hideMe,ResultSet::FROM_QUERY); > this->_registerResultSet(rs); > return rs; > } > *************** > *** 339,349 **** > ODBCXX_STRING_DATA(str):NULL); > } > > ! ResultSet* Statement::_getTypeInfo() > { > this->_beforeExecute(); > > ! SQLRETURN r=SQLGetTypeInfo(hstmt_,SQL_ALL_TYPES); > this->_checkStmtError(hstmt_,r,ODBCXX_STRING_CONST("Error fetching type information")); > > this->_afterExecute(); > --- 359,369 ---- > ODBCXX_STRING_DATA(str):NULL); > } > > ! ResultSet* Statement::_getTypeInfo(SQLSMALLINT datatype) > { > this->_beforeExecute(); > > ! SQLRETURN r=SQLGetTypeInfo(hstmt_,datatype); > this->_checkStmtError(hstmt_,r,ODBCXX_STRING_CONST("Error fetching type information")); > > this->_afterExecute(); > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAktJs50ACgkQ74ci1S6/F59UgQCgkWOaOrs313jR+hZ6vmwpMpv0 UzcAnA2DHkGFclKEXQ0AKrokc0KvFXSg =6eAz -----END PGP SIGNATURE----- |
From: Mark K. <gre...@ma...> - 2010-01-10 10:55:47
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Added as R155 will add unix support soon. please test and give feedback. Regards, Mark Kromis -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAktJsfEACgkQ74ci1S6/F59GvQCeNSFWPHMw9vVn0m3rS4ZzdXYH hVkAn1P1xFMdWWHMA4uB4DzM0T1pGmNp =zBTE -----END PGP SIGNATURE----- |
From: Matthew C. <mc...@ly...> - 2010-01-10 04:49:07
|
diff -crBN libodbc++-0.2.5-orig/include/odbc++/config-win32.h libodbc++-0.2.5/include/odbc++/config-win32.h *** libodbc++-0.2.5-orig/include/odbc++/config-win32.h Sat Mar 7 00:41:10 2009 --- libodbc++-0.2.5/include/odbc++/config-win32.h Thu Dec 17 21:54:41 2009 *************** *** 17,26 **** #define ODBCXX_HAVE_SET #define ODBCXX_HAVE_VECTOR - #define ODBCXX_ENABLE_THREADS #if defined(_MSC_VER) // MSVC has a rather compliant CXX lib # define ODBCXX_HAVE_ISO_CXXLIB --- 17,28 ---- #define ODBCXX_HAVE_SET #define ODBCXX_HAVE_VECTOR #define ODBCXX_ENABLE_THREADS #if defined(_MSC_VER) + #pragma warning( disable : 4251 4275 4786 4996) + # define _CRT_SECURE_NO_WARNING + // MSVC has a rather compliant CXX lib # define ODBCXX_HAVE_ISO_CXXLIB diff -crBN libodbc++-0.2.5-orig/include/odbc++/parametermetadata.h libodbc++-0.2.5/include/odbc++/parametermetadata.h *** libodbc++-0.2.5-orig/include/odbc++/parametermetadata.h Wed Dec 31 18:00:00 1969 --- libodbc++-0.2.5/include/odbc++/parametermetadata.h Sat Jan 9 19:23:57 2010 *************** *** 0 **** --- 1,72 ---- + /* + This file is part of libodbc++. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + */ + + #ifndef __ODBCXX_PARAMETERMETADATA_H + #define __ODBCXX_PARAMETERMETADATA_H + + #include <odbc++/preparedstatement.h> + + namespace odbc { + + class ODBCXX_EXPORT ParameterMetaData { + friend class PreparedStatement; + + private: + PreparedStatement *stmt_; + + ParameterMetaData( PreparedStatement *ps ); + + ResultSet* _getTypeInfo(SQLSMALLINT type); + + public: + /** Get the number of parameters in the prepared statement + */ + int getParameterCount(); + + /** Get the designated parameter's mode + */ + int getParameterMode(int param); + + /** Get the designated parameter's SQL type + */ + int getParameterType(int param); + + /** Get the designated parameter's database-specific type name + */ + ODBCXX_STRING getParameterTypeName(int param); + + /** Get the designated parameter's specified column size + */ + int getPrecision(int param); + + /** Get the designated parameter's number of digits to right of the decimal point + */ + int getScale(int param); + + /** Check if null values are allowed in the designated parameter + */ + int isNullable(int param); + + /** Check if values for the designated parameter can be signed numbers + */ + bool isSigned(int param) { return 0; } + }; + } + + #endif diff -crBN libodbc++-0.2.5-orig/include/odbc++/preparedstatement.h libodbc++-0.2.5/include/odbc++/preparedstatement.h *** libodbc++-0.2.5-orig/include/odbc++/preparedstatement.h Sat Mar 7 00:41:10 2009 --- libodbc++-0.2.5/include/odbc++/preparedstatement.h Mon Dec 28 21:41:10 2009 *************** *** 26,31 **** --- 26,32 ---- #include <odbc++/setup.h> #include <odbc++/types.h> #include <odbc++/statement.h> + #include <odbc++/resultsetmetadata.h> #if defined(ODBCXX_HAVE_ISO_CXXLIB) # include <iosfwd> *************** *** 38,43 **** --- 39,45 ---- namespace odbc { class Rowset; + class ParameterMetaData; /** A prepared statement. * *************** *** 62,67 **** --- 64,70 ---- class ODBCXX_EXPORT PreparedStatement : public Statement { friend class Connection; + friend class ParameterMetaData; private: void _prepare(); *************** *** 69,74 **** --- 72,79 ---- protected: ODBCXX_STRING sql_; + ParameterMetaData* parameterMetaData_; + //here we store the parameters Rowset* rowset_; size_t numParams_; *************** *** 120,125 **** --- 125,134 ---- /** Executes this statement, assuming it returns an update count */ int executeUpdate(); + ResultSetMetaData* getMetaData(); + + ParameterMetaData* getParameterMetaData(); + /** Sets a parameter value to a double * @param idx The parameter index, starting at 1 * @param val The value to set *************** *** 223,229 **** void setNull(int idx, int sqlType); }; - } // namespace odbc #endif // __ODBCXX_PREPAREDSTATEMENT_H --- 232,237 ---- diff -crBN libodbc++-0.2.5-orig/include/odbc++/resultset.h libodbc++-0.2.5/include/odbc++/resultset.h *** libodbc++-0.2.5-orig/include/odbc++/resultset.h Sat Mar 7 00:41:10 2009 --- libodbc++-0.2.5/include/odbc++/resultset.h Mon Dec 28 21:13:56 2009 *************** *** 32,42 **** --- 32,44 ---- class ResultSetMetaData; class Statement; + class PreparedStatement; class Rowset; /** A result set */ class ODBCXX_EXPORT ResultSet : public ErrorHandler { friend class Statement; + friend class PreparedStatement; friend class ResultSetMetaData; private: *************** *** 72,78 **** // Flag to determine if we can lazyfetch data bool supportsGetDataAnyOrder_; ! ResultSet(Statement* stmt,SQLHSTMT hstmt, bool ownStmt); //driver info const DriverInfo* _getDriverInfo() const { --- 74,84 ---- // Flag to determine if we can lazyfetch data bool supportsGetDataAnyOrder_; ! enum ResultSetType { FROM_UKNOWN, FROM_QUERY, FROM_METADATA }; ! ! ResultSetType resultSetType_; ! ! ResultSet(Statement* stmt,SQLHSTMT hstmt, bool ownStmt,ResultSetType rsType); //driver info const DriverInfo* _getDriverInfo() const { diff -crBN libodbc++-0.2.5-orig/include/odbc++/statement.h libodbc++-0.2.5/include/odbc++/statement.h *** libodbc++-0.2.5-orig/include/odbc++/statement.h Fri Jan 13 07:19:26 2006 --- libodbc++-0.2.5/include/odbc++/statement.h Fri Jan 1 19:03:39 2010 *************** *** 31,42 **** --- 31,45 ---- class ResultSet; class DriverInfo; + class ResultSetMetaData; + class ParameterMetaData; /** A simple non-prepared statement */ class ODBCXX_EXPORT Statement : public ErrorHandler { friend class Connection; friend class ResultSet; friend class DatabaseMetaData; + friend class ParameterMetaData; protected: Connection* connection_; *************** *** 47,54 **** --- 50,63 ---- return connection_->_getDriverInfo(); } + void _registerMetaDataResultSet(ResultSet* rs); + void _unregisterMetaDataResultSet(ResultSet* rs); + + ResultSet* _getMetaDataResultSet(); + private: ResultSet* currentResultSet_; + ResultSet* metaDataResultSet_; int fetchSize_; int resultSetType_; *************** *** 69,75 **** void _applyResultSetType(); ! ResultSet* _getTypeInfo(); ResultSet* _getTables(const ODBCXX_STRING& catalog, const ODBCXX_STRING& schema, const ODBCXX_STRING& tableName, --- 78,84 ---- void _applyResultSetType(); ! ResultSet* _getTypeInfo(SQLSMALLINT dataType=SQL_ALL_TYPES); ResultSet* _getTables(const ODBCXX_STRING& catalog, const ODBCXX_STRING& schema, const ODBCXX_STRING& tableName, |
From: Mark K. <gre...@ma...> - 2010-01-03 04:08:53
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patch committed to svn as R154. Regards, Mark Kromis On 2010/01/02, at 16:00, Ferenc Gerlits wrote: > Hi, > > Under gcc 4.1.1 (Ubuntu Karmic) I am getting this error when I try to > compile libodbc++: > > In file included from resultset.cpp:28: > datastream.h: In member function ‘virtual int > odbc::DataStreamBuf::overflow(int)’: > datastream.h:58: error: ‘EOF’ was not declared in this scope > > I have tried versions 0.2.4pre4, 0.2.5, and the svn trunk, they all > show the same error. I created this patch, feel free to use it if you > like it: > > --- libodbc++-0.2.5/include/odbc++/types.h 2009-03-05 > 14:23:21.000000000 +0100 > +++ libodbc++-0.2.5-cstdio/include/odbc++/types.h 2010-01-02 > 19:22:54.650900117 +0100 > @@ -25,6 +25,7 @@ > #include <odbc++/setup.h> > > #include <cstring> > +#include <cstdio> > #include <exception> > #include <assert.h> > > The ticket in our bugtracker, for reference: > http://trac.campware.org/campcaster/ticket/2354 > > Regards, > Ferenc > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > libodbcxx-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libodbcxx-devel -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAktAGEUACgkQ74ci1S6/F5+RoQCgh5CXFOHbGrb+f2cAMIEN8Pyq ib8Anj2B385Sgeg5op4aWkFPvoctW2wG =YYLL -----END PGP SIGNATURE----- |
From: Ferenc G. <fge...@gm...> - 2010-01-02 21:00:47
|
Hi, Under gcc 4.1.1 (Ubuntu Karmic) I am getting this error when I try to compile libodbc++: In file included from resultset.cpp:28: datastream.h: In member function ‘virtual int odbc::DataStreamBuf::overflow(int)’: datastream.h:58: error: ‘EOF’ was not declared in this scope I have tried versions 0.2.4pre4, 0.2.5, and the svn trunk, they all show the same error. I created this patch, feel free to use it if you like it: --- libodbc++-0.2.5/include/odbc++/types.h 2009-03-05 14:23:21.000000000 +0100 +++ libodbc++-0.2.5-cstdio/include/odbc++/types.h 2010-01-02 19:22:54.650900117 +0100 @@ -25,6 +25,7 @@ #include <odbc++/setup.h> #include <cstring> +#include <cstdio> #include <exception> #include <assert.h> The ticket in our bugtracker, for reference: http://trac.campware.org/campcaster/ticket/2354 Regards, Ferenc |
From: Mark K. <gre...@ma...> - 2010-01-01 08:27:29
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 include/odbc++/setup.h - removed ODBCXX_HAVE_ISO_CXXLIB defines m4/ac_check_odbc.m4 - check for headers for ODBCXX_HAVE_ISO_CXXLIB This should work for all configure based systems. feedback please. Regards, Mark Kromis -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAks9sekACgkQ74ci1S6/F59zpQCgpy9uwDmkqfIp3zahJrZy5eYr XksAn1pPjqvcioHEP2rxkew58u+bpIWB =A+fX -----END PGP SIGNATURE----- |