阅读:2960回复:7
使用ITable的CreateRow方法时,报错“自动化错误”
<P>使用ITable的CreateRow方法时,报错,报错信息为“自动化错误”。注:程序使用vb6.0开发,添加了geodatabase的权限。请指点!谢谢!</P>
[此贴子已经被作者于2007-9-6 14:44:44编辑过]
|
|
|
1楼#
发布于:2007-09-06 15:27
狂顶<img src="images/post/smile/dvbbs/em01.gif" />
|
|
2楼#
发布于:2007-09-07 17:10
用户被禁言,该主题自动屏蔽! |
|
3楼#
发布于:2007-09-07 22:19
期待高手指教
|
|
4楼#
发布于:2007-09-12 17:09
<P>xxbtop说的可以代替楼主的接口使用,并不会出现自动化错误,CreateRowBuffer是当插入或者更新的数据比较大的时候,可以大大提升更新速度的一个接口;</P>
|
|
|
5楼#
发布于:2007-09-14 11:54
<P>另外有个原因是:你的表格可能没有OID字段?</P>
<P>使用下面的代码应该可以</P> <P>'Create new row<BR>Dim pCursor As ICursor<BR>Dim pRowBuff As IRowBuffer</P> <P>Set pRowBuff = ptable.CreateRowBuffer</P> <P>'Populate the row with values<BR>pRowBuff.Value(0) = 100 'Numeric column<BR>pRowBuff.Value(1) = "Canada" 'Text column</P> <P>Set pCursor = ptable.Insert(True)</P> <P>pCursor.InsertRow pRowBuff<BR></P> |
|
|
6楼#
发布于:2007-11-08 13:05
<P>总统说得对!!!</P><img src="images/post/smile/dvbbs/em02.gif" />
|
|
7楼#
发布于:2007-11-09 12:29
<P>总统一语中的!</P>
<P>确实是ObjecID的问题,谢谢指点!</P> [此贴子已经被作者于2007-11-9 12:30:31编辑过]
|
|
|