What's the script for changing an integer variable to a null variable?
I can easily change a string variable to a null. Variable 'STR' = " "
I declare a variable 'INT' an integer in the beginning of my code. I also do a check later to ensure that 'INT' is actually an integer (the variable may not be set otherwise).
I've tried using the cInt(" ") or (INT = " "....cInt(INT) but that doesn't to work. Is there an easier way of converting a null value to an Integer and vice-versa and setting a variable to null that's actually an integer variable?
No you can't set an integer to null, you can set it to 0 or some other value that will stand fpr a "null" integer for your program. It depends what this integer is representing. For example if the integer represents the index of a zero-based array then -1 is a good choice for "null".
__________________
Have you tried looking right in front of you (or at least in MSDN)?
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET. subscribe