请问就是这样吗: ARecordSet.locate('ID',10,[]);
出错信息:Type not allowed in OLE Automation call(编译时)
出错信息:Type not allowed in OLE Automation call(编译时)
解决方案 »
- SQL语句出现了'数据提供程序或其他服务返回e_fail状态 '怎么回事'?
- delphi有没有 向java的Hibernate、c#的Castle这样的持久化数据库表的三方冬冬?
- 关于屏蔽热键和隐藏任务栏的问题!求救!
- 文件夹问题!高手请给点指点!
- Delphi编程时,如何从Access中读出一个Ole对象的字段
- 谁有<delphi3.0从入门到精通>?
- 如何在我的程序中打开IE浏览器并连接到指定站点?
- 编译项目时遇到 [Error] File not found: 'OGCONST.R32', 找不到那里有引用这个文件
- 如何在对等网上进行语音通话
- 关于主窗体不显示的问题
- 数据库问题多多,谁来帮我?我要做一个图书管理系统(Win98+Delphi5+Access2000),程序最终要在无Delphi的机器上演示给老师看,用什么方法
- 263邮箱有重大隐患?来自263的回应
AConnection := CreateOleObject('ADODB.Connection');
AConnection.Open('Driver={Microsoft Access Driver (*.mdb)};DBQ='+MyPath);
ARecordSet := CreateOleObject('ADODB.RecordSet');
ARecordSet.open( 'hello',AConnection,adOpenStatic,adLockOptimistic,adCmdText );
ARecordSet.locate('ID','2',[]);
ARecordSet.Fields['ID'] := 22;
ARecordSet.Fields['FullName'] := '22';
ARecordSet.Update;
不是个好习惯
ARecordSet.Find('ID=10',0,1,0);
if not ARecordSet.Eof then
//找到了
ARecordSet.open( 'hello',AConnection,adOpenStatic,adLockOptimistic,adCmdText );
ARecordSet.First;
ARecordSet.Find('ID=2',0,1,0);
if not ARecordSet.Eof then
begin
ARecordSet.Fields['ID'] := 22;
ARecordSet.Fields['FullName'] := '22';
ARecordSet.Update;//
end;
出现“无效的SQL语句”错误
ARecordSet.open( 'hello',AConnection,adOpenStatic,adLockOptimistic,adCmdText );
ARecordSet.First;
ARecordSet.Find('ID=2',0,1,0);
if not ARecordSet.Eof then
begin
ARecordSet.Edit;
ARecordSet.Fields['ID'] := 22;
ARecordSet.Fields['FullName'] := '22';
ARecordSet.Update;
end;
ARecordSet.open('hello',AConnection,adOpenStatic,adLockOptimistic,adCmdText );
Method “First” not supported by automation object