vb中如何把combo1.text添加到数据库相应的字段中?用additem?还是getstring?

来源:百度知道 编辑:UC知道 时间:2024/05/07 08:50:57
急。。。。。
With data.rsstudentcc
.AddNew
.Fields("姓名") = Trim(cboxm.Text) '姓名
.Fields("年级") = Trim(cbonj.Text) '年级
.Fields("班级") = Trim(cbobj.Text) '班级
.update
end with
这个可以吗?? 那我的怎么不行,还是这样:
With data.rsstudentcc
.getstring
.Fields("姓名") = Trim(cboxm.Text) '姓名
.Fields("年级") = Trim(cbonj.Text) '年级
.Fields("班级") = Trim(cbobj.Text) '班级
.update
end with
那个可以??

我只知道如何顺序读取TXT文件。
input #文件号,变量列表(只能读取用write语句写入的数据文件)。
比如,读取a.txt
dim strl as string
open "c:\a.txt" for input as #1
input #1, strl
close #1

还有line input(以回车换行为行尾,单独去的数据不包括回车和换行)
dim inputdata as string
text1.text=""
open cd1.filename for input as #1
do while not eof(1)
line input #1, inputdata
text1.text = text1.text+inputdata+vbCrLf
loop
close #1

可以