2020国家取消个体户:这几句vb代码是什么意思?

来源:百度文库 编辑:神马品牌网 时间:2024/04/27 16:21:33
Private Sub Command1_Click()
Set con = New ADODB.Connection
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=gzgl.mdb;Persist Security Info=False"
con.CursorLocation = adUseClient
con.Open
mysql = "select 员工信息.编号 as 编号,姓名,部门,职务,基本工资,津贴,伙食费,洗理,书报,交通,奖金 from 工资信息,员工信息 where 员工信息!部门='" & Text1.Text & "' and 员工信息!编号=工资信息!编号"(叹号是什么意思?)
Set rst = con.Execute(mysql)
s = rst.Fields.Count
If rst.BOF = True Then
MsgBox "您要查询的部门不存在!", 48, "警告"
Text1.SetFocus
Else
Set DataGrid1.DataSource = rst
For i = 0 To s - 1
DataGrid1.Columns(i).Alignment = dbgCenter
DataGrid1.Columns(i).Width = 1000
Next i
End If
DataGrid1.AllowUpdate = False
End Sub

其中这几句代码是什么意思?

con.CursorLocation = adUseClient

员工信息!部门='" & Text1.Text & "' and 员工信息!编号=工资信息!编号"(叹号是什么意思?)

Set rst = con.Execute(mysql)

rst.BOF = True

DataGrid1.Columns(i).Alignment = dbgCenter

另外,rs.EOF rst.BOF 这里面的属性EOF,BOF是什么意思啊?

rs.EOF rst.BOF 是记录集末和记录集头

eof 大概是判断空的,我来学习……