Sheraz <[EMAIL PROTECTED]> wrote on 04/08/2004 13:14:26:
> Hi
> I need to store a globabl unique identifer value in
> mysql4.x database table.....
>
> table field is varchar(16) as the string length is 16
> byte or 128 bits....my string data is unsiged char
> type......
>
> how can i send that data to mysql table ?
> will it require binary storage for this unsigned data
> ?....
> I'm asking this because ...i have 16 bytes unsgined
> char data in the variable....now i need to pass that
> to query...........but all it seems to pass it like
> casting with (char *)....which i dont want...
>
> any help or clue in unsigned char 16 bytes array
> string into myslq database ?
You need to specify which language you are using. I could tell you the
answer in Java, but I suspect that you are using C/C++ because of the way
you are using char to store binary data. I would suggest that you ought to
be using a column type of BLOB(16), and investigating you set a BLOB in
your preferred language. In Java I would use a PreparedStatement and
setBlob().
Alec
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]