我是靠谱客的博主 激情歌曲,这篇文章主要介绍VB.NET校验字符串函数,现在分享给大家,希望可以做个参考。

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(181)

评论列表共有 0 条评论

立即
投稿
返回
顶部