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
原文链接:https://www.f2er.com/vb/257887.html