I'm a novice programmer and everything I've learned about VB.net has come from books and the internet. I actually did study some computer languages in college but Fortran and C aren't used much these days. So if my coding isn't the most efficient or I make mistakes or I don't have the correct terminology, that's why. I'm learning. Be kind.
Wednesday, April 13, 2011
Integer vs. string
I think, but I may be wrong, that when you set up your database and define the datatypes that it's best to choose string (varchar) instead of integer unless the value truly needs to be treated as an integer. I'm just guessing though. My reason for this thought is that I set one of my fields as an integer because a user would enter numbers into it. But in reality the numbers were just a label and I probably should have made that field a varchar. I say this because those values are used as the choices for a combobox and I can't include a blank value with the number...because blank is not an integer. I've added "zero" to the list but I don't like it. I want blank, so I'll have to figure something else out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment