Hey Warren, I tracked this down to line 103 in field_names.h which is called
by line 45 within the init function of field_names.cpp
I commented this out and recompiled and now the column case is properly
preserved in my result set when using the mysql++ API
Regards,
/*
Joe Stein, 973-944-0094
http://www.medialets.com
*/
On Wed, Feb 24, 2010 at 6:16 PM, Warren Young <mysqlpp@stripped> wrote:
> On 2/24/2010 12:31 PM, Joe Stein wrote:
>
>>
>> I am getting "countrycodes" and the column returned by my sproc (which I
>> also see in command line calling the sproc) is "countryCodes"
>>
>
> MySQL++ isn't changing the case on you. It's just passing along whatever
> the underlying MySQL C API gives us.
>
> While it's possible the C API is smashing the case, I doubt it. If you
> look at the DB schema with MySQL Workbench, I think you'll find that it's
> all-lowercase. If so, the person who ran the CREATE statement for that
> table used the all-lowercase spelling, and the server is "fixing" your
> stored procedure code for you to match.
>
> Column names aren't case-sensitive in SQL. Maybe this match you're trying
> to do on the client side should be case-insensitive, too.
>
> Yes, I'm throwing stones from within a glass house. SSQLS doesn't do
> case-insensitive matching. (I've added it to the Wishlist.) If this is the
> problem you're running into, you could hack Result::field_num() and related
> stuff to make them use case-insensitive matching. Or, use
> sql_create_complete_*() to set your SSQLS up so it will use the case that
> makes the server happy while your C++ code uses the style that makes you
> happy.
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
> http://lists.mysql.com/plusplus?unsub=1
>
>