W
whogo
Unregistered / Unconfirmed
GUEST, unregistred user!
我用ADODB.RECORDSET做内存表,放入数据后居然无法读出来,请各位大虾多多指教。
代码如下:
VAR
rs:Variant;
BEGIN
rs:=CreateOleObject('ADO.RECORDSET');
rs.fields.append('fld',$00000081,5,$00000004);
rs.cursortype:=$00000001;
rs.locktype:=$00000003;
rs.open;
rs.fields('fld')='abcde';
rs.update;
rs.movefirst;
//就是下面这条语句出错,弹出对话框:"无效索引"
edit1.text:=rs.fields('fld');
rs.close;
END;
代码如下:
VAR
rs:Variant;
BEGIN
rs:=CreateOleObject('ADO.RECORDSET');
rs.fields.append('fld',$00000081,5,$00000004);
rs.cursortype:=$00000001;
rs.locktype:=$00000003;
rs.open;
rs.fields('fld')='abcde';
rs.update;
rs.movefirst;
//就是下面这条语句出错,弹出对话框:"无效索引"
edit1.text:=rs.fields('fld');
rs.close;
END;