Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: linking mysql++ 2.3.2: msg#00029

db.mysql.c++

Subject: Re: linking mysql++ 2.3.2

Thanks Warren,

Building one project at a time in Eclipse and making sure
MYSQLPP_SSQLS_NO_STATICS was n the right places did the trick.

With my template functions, SSQLSes do what I want for now and I've written
quite a chunk of code that already uses them. But if I find I need to tweak
them more I may go with your MyGenericThingy suggestion, thank you.

Note of warning duly taken re putting OO structure on relational DBs. Seems
like a pragmatic solution for now though.

Thanks for your help!

Joe


On 03/12/2007, Warren Young <mysqlpp@xxxxxxxxxxx> wrote:
>
> Joe Hudson wrote:
> >
> > with you on the PIC microcontrollers :) well the include path for
> mysql.h is
> > set in the project settings.
> > and that is the first error... Seems Eclipse was very confusingly
> displayng
> > errors for other projects in my build group,. :)
>
> Dunno what to tell you, then. I don't think anything has changed in the
> way we #include MySQL C API headers in quite a while.
>
> > would
> > defining MYSQLPP_SSQLS_NO_STATICS globally and just calling:
> >
> > MYSQLPP_SSQLS_EXPAND(<SSQLS name>)
> >
> > once for each struct in a .cpp file for the header that defines the
> SSQLS's
> > be a reasonable solution to where there are lots of modules that use the
> > same SSQLS's?
>
> No. MYSQLPP_SSQLS_EXPAND isn't called that way, and replicating the way
> it *is* called would evaporate much of the advantage of SSQLSes.
>
> You can do something like this instead in the .h file:
>
> #if !defined(EXPAND_MYSTRUCT)
> #define MYSQLPP_SSQLS_NO_STATICS
> #endif
>
> And then #define EXPAND_MYSTRUCT before #including that header in the
> one module that you nominate as owning the SSQLS.
>
> > I have lots (a few thousand) of tables with the same
> > structure, but I want them as seperate tables because each could contain
> a
> > lot of data and they are for seperate real world things that I want to
> keep
> > seperate in the DB. I just want a neat and convenient way of using the
> same
> > SSQLS type to manipulate different tables with the same structure. Is
> that
> > weird?
>
> It sounds to me like you're trying to impose an OO structure on top of a
> relational database, always a tarpit.
>
> Maybe you should do without SSQLS altogether, and populate data
> structures you define from the lower-level Row data instead:
>
> struct MyGenericThingy {
> int a;
> string b;
>
> MyGenericThingy(mysqlpp::Row& row) :
> a(row["a"]),
> b(row["b"])
> {
> }
> };
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
> http://lists.mysql.com/plusplus?unsub=joe.hudson@xxxxxxxxx
>
>


--
LIVE MUSIC + OTHER PERFORMANCE ART CHARITY FUNDRAISER
Doors 6.30pm - 1st act 7:30pm, 2nd SUNDAY of EVERY month
@ THE TALKING HEADS, PORTSWOOD Rd, SOUTHAMPTON
£3 entrance: all profits to 2 Local Charities. SCRATCH and HAMPSHIRE
AUTISTIC SOCIETY
-----------------------------------------------------------------------------------------------


Contact joe.hudson@xxxxxxxxx for more info.
-------------------------------------------------------
---------------------------------------
Visit http://www.myspace.com/littlecog for latest details, to post new
events or volunteer for future community action events.
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation