vb.net 动态传参小结

前端之家收集整理的这篇文章主要介绍了vb.net 动态传参小结前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


' Dim paramsCount As Integer = 1
' Dim parameters(1) As IDataParameter

' If (Not carCd = Integer.MinValue) AndAlso (Not carCdSeqNo = Integer.MinValue) Then
' sql += sqlManager.GetsqlString("KYT003","SelectCarMst2")
' paramsCount += 1
' ReDim Preserve parameters(paramsCount)

' ’’’’’’’’’’’’’’’’’’作为参数的数据

' parameters(paramsCount) = adapter.CreateDataParameter("@CarCd")

' parameters(paramsCount).DbType = DbType.Int32

’’’’’’’’’’’’’’’’’’参数

' parameters(paramsCount).Value = carCd


' paramsCount += 1
' ReDim Preserve parameters(paramsCount)

’’’’’’’’’’’’’’’’’’作为参数的数据

' parameters(paramsCount) = adapter.CreateDataParameter("@CarCdSeqNo")

' parameters(paramsCount).DbType = DbType.Int32

' ’’’’’’’’’’’’’’’’’’参数

parameters(paramsCount).Value = carCdSeqNo

' End If

原文链接:https://www.f2er.com/vb/257594.html

猜你在找的VB相关文章