📄 自定义查询管理.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form 自定义查询管理
BackColor = &H00C0FFC0&
BorderStyle = 3 'Fixed Dialog
Caption = "自定义查询管理"
ClientHeight = 3150
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 6585
HelpContextID = 235
Icon = "自定义查询管理.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3150
ScaleWidth = 6585
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton 删除自定义查询
BackColor = &H00C0FFC0&
Caption = "删除自定义查询"
Height = 435
HelpContextID = 235
Left = 4860
Style = 1 'Graphical
TabIndex = 6
Top = 2460
WhatsThisHelpID = 235
Width = 1575
End
Begin VB.CommandButton 增加自定义查询
BackColor = &H00C0FFC0&
Caption = "增加自定义查询"
Height = 435
HelpContextID = 235
Left = 3060
Style = 1 'Graphical
TabIndex = 5
Top = 2460
WhatsThisHelpID = 235
Width = 1695
End
Begin VB.TextBox SQL
BackColor = &H00FFFCEC&
Height = 1275
HelpContextID = 235
Left = 3060
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 4
Top = 1020
WhatsThisHelpID = 235
Width = 3375
End
Begin VB.TextBox 查询名称
BackColor = &H00FFFCEC&
Height = 315
HelpContextID = 235
Left = 4080
TabIndex = 2
Top = 180
WhatsThisHelpID = 235
Width = 2355
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 2715
Left = 180
TabIndex = 0
Top = 180
WhatsThisHelpID = 235
Width = 2715
_ExtentX = 4789
_ExtentY = 4789
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 2
RowHeight = 15
AllowDelete = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
MarqueeStyle = 3
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 0
Top = 0
WhatsThisHelpID = 235
Width = 2115
_ExtentX = 3731
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select 查询名称,SQL语句 from 自定义查询"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "SQL语句:"
Height = 195
Left = 3060
TabIndex = 3
Top = 660
WhatsThisHelpID = 235
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "查询名称:"
Height = 195
Left = 3060
TabIndex = 1
Top = 240
WhatsThisHelpID = 235
Width = 855
End
End
Attribute VB_Name = "自定义查询管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Adodc1.ConnectionString = DataConnectString
Adodc1.Visible = False
End Sub
Private Sub Form_Resize()
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
DataGrid1.Columns(1).Width = 0
End Sub
Private Sub 删除自定义查询_Click()
Adodc1.Recordset.Delete
DataGrid1.Columns(1).Width = 0
'写入系统日志
fMainForm.WriteLog ("删除自定义查询")
End Sub
Private Sub 增加自定义查询_Click()
If 查询名称.Text = "" Then MsgBox "请填写查询名称!": Exit Sub
If SQL.Text = "" Then MsgBox "请填写查询SQL语句!": Exit Sub
On Error Resume Next
If Adodc1.Recordset.RecordCount >= 8 Then
MsgBox "最多只允许8组自定义查询!"
Exit Sub
End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("查询名称").Value = 查询名称.Text
Adodc1.Recordset.Fields("SQL语句").Value = SQL.Text
Adodc1.Recordset.update
Adodc1.Recordset.Requery
Adodc1.Refresh
DataGrid1.Columns(1).Width = 0
'写入系统日志
fMainForm.WriteLog ("新增自定义查询")
End Sub
'此源码由程序太平洋收集整理发布,任何人都可自由转载,但需保留本站信息
'╭⌒╮┅~ ¤ 欢迎光临程序太平洋╭⌒╮
'╭⌒╭⌒╮╭⌒╮~╭⌒╮ ︶ ,︶︶
',︶︶︶︶,''︶~~ ,''~︶︶ ,''
'╔ ╱◥███◣═╬╬╬╬╬╬╬╬╬╗
'╬ ︱田︱田 田 ︱ ╬
'╬ http://www.5ivb.net ╬
'╬ ╭○╮● ╬
'╬ /■\/■\ ╬
'╬ <| || 有希望,就有成功! ╬
'╬ ╬
'╚╬╬╬╬╬╬╬╬╬╬╗ ╔╬╬╬╬╝
'
'说明:
'专业提供VB、.NET、Delphi、ASP、PB源码下载
'包括:程序源码,控件,商业源码,系统方案,开发工具,书籍教程,技术文档
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -