۱۹-تير-۱۳۹۲, ۱۶:۲۰:۲۶
مشکل کد در کجاست؟
کد:
Public strcon As New ADODB.Connection
Public cmd As New ADODB.Command
Public rs As New ADODB.Recordset
Public filtersort As Boolean
Public Sub connect(s As String)
cmd.ActiveConnection = strcon
cmd.CommandText = s
Set rs = cmd.Execute()
End Sub
Public Sub fill()
If Not (rs.EOF = True Or rs.BOF = True) Then
frm_teacher.txt_code.Text = IIf(rs("teachercode") = vbNull, "", rs("teachercode"))
frm_teacher.txt_name.Text = rs("fname")
frm_teacher.txt_family.Text = rs("lname")
frm_teacher.txt_rank.Text = rs("rank")
frm_teacher.txt_phon.Text = rs("tel")
frm_teacher.txt_address.Text = rs("address")
End If
End Sub