Author: icm63 | Posted on: 12/4/2009 5:14:17 PM | Views : 237

Q1:whats best for empty string or empty text box ( variable and/or  object)

Me.txtBox.text.tostring.length < 1
Dim str as string
str.length < 1
 OR
string.Isemptyornull(str)=true

string.Isemptyornull(Me.txtBox.text.tostring) = true
OR
str = string.empty
Me.txtBox.text.tostring = string.empty


Q2: I have a usercontrol that pulls data from SQL tabke 3 times via a IDatareader, its fast and IData reader reads data forward only. But I hit the server 2 times, would it be better to pull data up via DataTable and then loop thru the data 3 times in code populating the control. ??So when does it become better to move from IDatareader to datatable when, Idatareader uses add up ???













...

Go to the complete details ...