I have a MySQL database (5.6 Community) with a column of type bit(60). The field holds values such as 1001, 0011, etc. I am trying to pass a string of "1010" to the database through a vb.net adapter. If I use a regular query it would look like this:
insert into my_table (my_bit_field) values (b'1010');
This works and inserts the string exactly as shown but I need to use a data adapter so I can't send the query directly.
When using the data adapter in vb.net, I was getting an error saying that it was expecting a byte array. So I tried using that:
System.Text.Encoding.ASCII.GetBytes("1010")
but it just converted it to its ASCII representation of bytes (49,48,49,48).
Is there a better way to go through the data adapter and is there a way to do this?
Thanks.