一段代码,不是很明白,望指教
问一下,下面这代码中SQL语句的意思,还有如果我用的话是不是直接在form里面添加不用其他什么控件或者其他东西了?谢谢大家
红色部分的意思~
Private Sub Form_Load()
Dim con As New ADODB.Connection
Dim rs As New Recordset
Dim UserStr As String
Dim i As Integer
cmbType.ListIndex = 0
UserStr = "select * from administrator"
If mdlCon.connectTotable(con, rs, UserStr) Then
While Not rs.EOF
cmbUser.AddItem rs!admin
rs.MoveNext
Wend
rs.Close
con.Close
Else
MsgBox "欢迎初次使用本统,默认用户名和密码:admin", vbInformation + vbOKOnly, "欢迎登录"
rs.Close
rs.Open "insert into administrator values('admin','经理','admin')"
End If
End Sub