vb.net BL

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

Imports System.Data
Imports System.Data.sqlClient

Imports Gates.DA

Namespace BL

Public Class Common

Dim _DBTrans As DBTransaction

Public Sub New(ByVal connectionString As String)
_DBTrans = New DBTransaction(connectionString)
End Sub


Public Function QueryByPN(ByVal PN As String) As DataSet

Dim reDS As New DataSet
Dim strsql As String

Try

strsql = " select * from apps.releasedJob where" & _
" partnumber='" & PN & "'"


reDS = _DBTrans.sqlToDataset("Job",strsql)
Return reDS

Catch ex As Exception
Throw ex
End Try

End Function

End Class
End Namespace


Namespace BL
Public Class clxMain
Public Const CONNECTIONSTRING As String = "Data Source=LDBYYQ3R1\MysqLTEST; Initial Catalog=MES_TRANS_MCD; User ID=sa; PassWord=admin; Persist Security Info=False;"

End Class End Namespace

猜你在找的VB相关文章