|
-
June 13th, 2006, 03:46 PM
#1
Using MS SQL Binary Data Type
I want to use varBinary to store some values but I'm a little confused on choosing the correct size for the data type. I'm not use to dealing with binary.
I think I understand that Binary is stored as bytes...? If, for example, I have a string that is going to be a maximum of 30 characters long, I would use the nVarChar data type with a size of 30. So if I am storing a password that is no more then 30 characters long (from an array), and saving it as varBinary, would I choose 30 as the size for the binary data type?
Also, I'm looking for a very good buffer to read binary data from the database, are there any excellent examples of a buffer I could use when reading the binary data from the database? Should I also use the buffer when saving data to the database?
Thanks in advance.
Last edited by Shup; June 13th, 2006 at 03:58 PM.
For replies, I am using:
MS SQL 2000, VS .Net 2003, Visual C++ 6.0, XP Pro
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|