VB.NET校验字符串函数
VB.NET校验字符串函数
发布时间:2016-12-28 来源:查字典编辑
摘要:VB.NET校验字符串是否是日期'ValidateforadateSharedFunctioncheckdate(ByValthisvalu...

VB.NET校验字符串是否是日期

'Validate for a date Shared Function checkdate(ByVal thisvalue As String) As String If Not IsDate(thisvalue) Then checkdate = "NULL" Else checkdate = "'" & thisvalue & "'" End If Return checkdate End Function ' END checkdate

VB.NET检查字符串是否是数字

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'Used to submit values to the database, check for empty value, replace w/ "NULL" '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Shared Function checkNumber(ByVal thisvalue As String) As String If IsDBNull(thisvalue) Or Len(thisvalue) = 0 Or Not IsNumeric(thisvalue) Then checkNumber = "NULL" Else checkNumber = thisvalue End If Return checkNumber End Function ' END checkNumber

以上所述就是本文的全部内容了,希望大家能够喜欢。

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新vb.net学习
热门vb.net学习
编程开发子分类