Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Table() returns null

From: Warren Young <mysqlpp(at)etr-usa.com>
Date: Thu Sep 27 2007 - 23:01:49 EDT


David Sevier wrote:
>
> Query query = con.query();
> String QueryString = "select * from diagnostics";
>
> query << QueryString.cString();

Why are you doing this the hard way? What's wrong with:

        query << "select * from diagnostics";

?

> This works for the most part. Except that I always get (Null) returned for
> the Table Name and 0 for the length of the field.

MySQL++ is just passing along what it gets from the underlying C API, and I don't care to investigate the reason it doesn't give you what you expect. Two reasons:

  1. I don't see what this would tell you that you don't already know. You passed the table name in the SELECT query.
  2. If you need the names of tables without knowing them ahead of time, the correct way is shown in examples/dbinfo.cpp

See also examples/fieldinf1.cpp

-- 
MySQL++ Mailing List
For list archives: 
http://lists.mysql.com/plusplus
To unsubscribe:    
http://lists.mysql.com/plusplus?unsub=lists@pantek.com
Received on Thu Sep 27 23:00:19 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:03:24 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library