List:MySQL++« Previous MessageNext Message »
From:Graham Reitz Date:August 11 2007 12:43am
Subject:Re: How to initialize mysqlpp::sql_tinyblob?
View as plain text  
Thank Warren,

I ditched the binary password representation, not needed. (you're  
correct)

Graham


On Aug 9, 2007, at 7:01 AM, Warren Young wrote:

> Graham Reitz wrote:
>> How would you initialize password in the following SSQLS?
>> sql_create_2(clients, 1, 2,
>>                      unsigned int, client_id,
>>             mysqlpp::sql_tinyblob, password)
>> clients client;
>> client.client_id = 1;
>> client.password = ????;
>
> I imagine you're using a BLOB type because you're keeping the  
> password in some sort of binary representation, so a straight  
> assignment won't work.  Perhaps you're using a hashing scheme and  
> want to use the raw binary form instead of a hexadecimal text  
> representation.
>
> If reconsidering the choice to use a binary representation isn't an  
> option, you can get by with this:
>
> 	ColData cd(ptr_to_data, bytes_in_data_block);
> 	client.password = cd;
>
> All of the BLOB types as of v2.3 are typedefs for ColData.
>
> -- 
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:    http://lists.mysql.com/plusplus? 
> unsub=grahamreitz@stripped
>

Thread
multiple definitions of symbol linker error using sql_create_#Graham Reitz6 Aug
  • Re: multiple definitions of symbol linker error using sql_create_#William F. Dowling6 Aug
    • Re: multiple definitions of symbol linker error using sql_create_#Graham Reitz6 Aug
  • Re: multiple definitions of symbol linker error using sql_create_#Graham Reitz6 Aug
  • Re: multiple definitions of symbol linker error using sql_create_#Graham Reitz6 Aug
  • MYSQLPP problem in visual studio : mysqlpp.dll was not found !!!Cedrik Magis7 Aug
    • Re: MYSQLPP problem in visual studio : mysqlpp.dll was not found!!!Michael Nye7 Aug
      • RE: MYSQLPP problem in visual studio : mysqlpp.dll was not found !!!Jim Wallace7 Aug
        • RE: MYSQLPP problem in visual studio : mysqlpp.dll was not found !!!Ian Daysh7 Aug
          • RE: MYSQLPP problem in visual studio : mysqlpp.dll was not found !!!Jim Wallace7 Aug
            • RE: MYSQLPP problem in visual studio : mysqlpp.dll was not found !!!Ian Daysh7 Aug
            • How to initialize mysqlpp::sql_tinyblob?Graham Reitz8 Aug
              • Re: How to initialize mysqlpp::sql_tinyblob?Warren Young9 Aug
                • Re: How to initialize mysqlpp::sql_tinyblob?Graham Reitz11 Aug
        • RE: MYSQLPP problem in visual studio : mysqlpp.dll was not found !!!Cedrik Magis7 Aug