Tutorials to .com

Tutorials to .com » Dotnet » Database » DBNull to use skills

DBNull to use skills

Print View , by: iSee ,Total views: 7 ,Word Count: 205 ,Date: Mon, 15 Jun 2009 Time: 2:47 AM

Easy to use DBNull dynamic studio skills EPower2002

One of the changes in vb.net is to use VB6 in the IsNull and IsEmpty function to delete, and provide another way to determine whether the variable is initialized, that is, IsDBNull () method.
IsDBNull () method accept an object as its parameters and returns a boolean value whether the instructions to initialize variables.
Dim strMyName as String
if Not isDBNull (strMyName) Then
strMyName = "Initialize my string"
end if

In addition, VB.NET also provides DBNull class, which is part of system namespace. Its use is: first declare a variable type of DBNull, and then, the variables being used for comparison Is to determine the set of variables has been initialized.
Dim sysNull as System.DBNull
Dim strMyName as String
if strMyName is sysNull Then
strMyName = "Initialize my string"
end if

.Net Database Articles

Can't Find What You're Looking For?

Rating: Not yet rated


No comments posted.