打开对话框选择文件:http://www.foxtable.com/webhelp/topics/0328.htm
然后根据文件名拆分获取班级和人名,比如
Dim dlg As New OpenFileDialog
dlg.MultiSelect = True
If dlg.ShowDialog = DialogResult.OK Then
OutPut.Show("你选择了" & dlg.FileNames.Length & "个文件, 分别是:")
For Each fl As String In dlg.FileNames
Dim filename As String = FileSys.GetName(fl)
Output.Show(filename )
Dim bj As String = filename.SubString(0,2)
Output.Show(bj)
Dim name As String = filename.SubString(2,filename.Length - 8)
Output.Show(name)
Dim dr As DataRow = DataTables("表A").Find("班级='" & bj & "' And 姓名='" & name & "'")
If dr IsNot Nothing Then
dr("二维码") = filename
End If
Next
End If