三亚美高梅酒店要小费:这几句代码是什么意思?

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/04 13:45:24
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是什么意思啊?

定为数据库光标(开始读数据的位置吧)
end of file
begin of file
叹号应该是.吧,和前面的员工信息.编号一样,表示数据库里面的表