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.