Class_System.cls
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:3k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "Class_System"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Public Sub StatusBar(str As String, TF As Boolean)
- If TF = True Then Form_main.StatusBar.Panels(2).Text = "就绪": Form_main.Refresh: Exit Sub
- Form_main.StatusBar.Panels(2).Text = str
- Form_main.Refresh
- End Sub
- Public Function System_Sql() As String
- On Error Resume Next
- Conn_System2.Execute "DROP TABLE HDSystem_DataBases"
- Conn_System2.Execute "CREATE TABLE HDSystem_DataBases (" _
- & "DataBasesName Nvarchar(18 ) NOT NULL," _
- & "Number Nvarchar(8) NULL," _
- & "CountingRoomName Nvarchar(20) NULL," _
- & "NewDate datetime NULL," _
- & "BackupDate datetime NULL," _
- & "RestoreDate datetime NULL," _
- & "ServerName varchar(30) NULL," _
- & "DatabaseType varchar(30) NULL," _
- & "YNuse char(1) NULL," _
- & "CoName nvarchar(50) NULL," _
- & "Address nvarchar(50) NULL," _
- & "Phone nvarchar(30) NULL," _
- & "qsqj int" _
- & ")"
- Conn_System2.Execute "ALTER TABLE HDSystem_DataBases " _
- & "ADD PRIMARY KEY (DataBasesName)"
- Conn_System2.Execute "DROP TABLE HDSystem_BakDataBases"
- Conn_System2.Execute "CREATE TABLE HDSystem_BakDataBases (" _
- & "Number int IDENTITY(1,1)," _
- & "DatabaseName nvarchar(30) NOT NULL," _
- & "BakName nvarchar(30) NULL," _
- & "BakPath nvarchar(100) NULL," _
- & "BakDate datetime NULL" _
- & ")"
- Conn_System2.Execute "ALTER TABLE HDSystem_BakDataBases " _
- & "ADD PRIMARY KEY (Number, DatabaseName)"
- Conn_System2.Execute "DROP TABLE HDSystem_Password"
- Conn_System2.Execute "CREATE TABLE HDSystem_Password (" _
- & "id smallint NOT NULL," _
- & "Password varchar(50) NULL" _
- & ")"
- Conn_System2.Execute "ALTER TABLE HDSystem_Password " _
- & "ADD PRIMARY KEY (id)"
- Conn_System2.Execute "Drop proc dbo.HD_AddDatabase"
- Conn_System2.Execute Form_user.Text1(2).Text
- Conn_System2.Execute "Drop proc dbo.HD_BakDatabase"
- Conn_System2.Execute Form_user.Text2(3).Text
- Conn_System2.Execute "EXEC sp_addlogin 'HXXD', '123'"
- Conn_System2.Execute "EXEC sp_addsrvrolemember 'HXXD', 'sysadmin'"
- End Function