阅读:1681回复:3
[求助]DELPHI+AO添加记录的问题
<P>将VB中的添加纪录的代码改为DELPHI ,报错:</P>
<P>procedure AddFeatureClass;<BR>var<BR> pMap:IMap;<BR> pLayer:ILayer;<BR> pFeatureLayer:IFeatureLayer;<BR> pFeatureClass:IFeatureClass;<BR> pFeatureCursor:IFeatureCursor;<BR> pFeatureBuffer:IFeatureBuffer;<BR> n:integer;<BR> ov:olevariant;<BR>begin<BR> vMainMap.ActiveView.Get_FocusMap(pMap);<BR> pMap.Get_Layer(0,pLayer);<BR> pFeatureLayer:=pLayer as IFeatureLayer;<BR> pFeatureLayer.Get_FeatureClass(pFeatureClass);<BR> if pFeatureClass=nil then exit;<BR> <FONT color=#f73809>pFeatureClass.Insert(true,pFeatureCursor);//此句报错</FONT><BR> pFeatureClass.CreateFeatureBuffer(pFeatureBuffer);<BR> n:=-1;<BR> pFeatureBuffer.Set_Value(6,'Insert Land');<BR> pFeatureCursor.InsertFeature(pFeatureBuffer,ov);<BR> n:=ov;<BR> if n<>-1 then showmessage(inttostr(n));<BR>end;</P> <P>希望各位帮忙,谢谢!</P> |
|
1楼#
发布于:2005-08-31 09:46
各位,帮帮忙吧
|
|
2楼#
发布于:2005-08-31 10:04
在开发帮助里看
<H1>Insert features using an insert cursor</H1> <H1>这个例子</H1> |
|
|
3楼#
发布于:2005-09-07 20:39
<P>Delphi中为什么老是报这个错误呢?</P>
<P>Project aosample.exe raised exception class eaccessviolation with message 'access violation as address 034Df7f4 in module 'shapefilefdb.dll'. Read of adress FFFFFFFF'.Peocess stopped.Use Step or Run to continue.</P> <P>哪位用delphi开发的帮帮</P> |
|