|
10楼#
发布于:2004-09-23 15:20
<P>不用VARIANT类型,</P><P>你若只要按数值索引取得字段值的话应该这样</P><P>CMoRecordset recs;</P><P>CMoTableDesc tdesc(recs.GetTableDesc());获得表描述对象</P><P>CString str=tdesc.GetFieldName((short)iItem);</P><P>CMoField field(recs.GetFields().Item(COleVariant(TEXT(str))));
CString str2=field.GetValueAsString(); </P> |
|
|
11楼#
发布于:2004-09-23 16:26
终于解决了
<P>用CMoTableDesc不能获得"Shape"和"FeatureId"字段,</P>
<P>后经高手whitehorse指点<img src="images/post/smile/dvbbs/em13.gif" /><img src="images/post/smile/dvbbs/em05.gif" />,可以用CMoIterator类,使用前要先加入MFC例子中的MapObjects2.h,MapHelper.h,MapHelper.cpp</P><img src="images/post/smile/dvbbs/em04.gif" /> |
|
|
12楼#
发布于:2004-09-24 12:50
哈哈,真高,以前怎么没想过呢,有高人的qq吗
|
|
|
13楼#
发布于:2004-11-08 17:40
<P>dim rst as mapobjects2.recordset</P><P>set rst=...........</P><P>msgbox rst.fields("字段名").value</P>
|
|
上一页
下一页