- 打印本文 关闭窗口
- 连接SQL SERVER的公共类(VB.NET)
- 作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005/9/10 12:26:58
- sp; '//******************************************************************
'//**定义连接SQL Server Database的通用函数**//
'//本函数创建一个到指定数据库的连接对象 SqlConnection
'//本函数有1个参数,IPublicApplication 为公共数据结构 PublicApplicationVal,
'//Begin define Function IParseDeptOrgidPublic Function IParseDeptOrgid(ByVal IDeptOrgid As String) As PublicOrganIDStructure
Dim OrganID As New PublicOrganIDStructure()
Dim Orgid As String
IDeptOrgid = Trim(IDeptOrgid)Orgid = Microsoft.VisualBasic.Left(Trim(IDeptOrgid), 12)
OrganID.DeptTopID = Microsoft.VisualBasic.Left(Orgid, 6)OrganID.DeptMidId = Microsoft.VisualBasic.Right(Orgid, 6)
OrganID.DeptLowId = Microsoft.VisualBasic.Right(IDeptOrgid, 6)
IParseDeptOrgid = OrganIDEnd Function
'//End define Function IParseDeptOrgid
End ClassEnd Namespace
'*******************************************************************************
- 打印本文 关闭窗口