liudaoshan 发表于 2003-2-12 11:36:00

求助

我寫了如下程式,在Acad2000,2002英文版可用,為什麼在另一PC(沒有安裝VC及OBJARX)上的ACAD2002中文版不可用,arxload 沒問題,運行時出錯.提示為:
*.arx ARX命令發生異常
未處理的異常E06D7363(e06d7363h),地址:77E69B01H.
ADS 請求錯誤.
程式如下請幫我看一下:
#include "StdAfx.h"
#include "StdArx.h"
// This is command 'FOXREAD'
int FOXREAD()
{
      resbuf *pArg =acedGetArgs () ;
      char *refname = "NetSend.mdb";
      char fullpath;
      if (acedFindFile(refname, fullpath) != RTNORM) return(RTNORM);
      CDaoDatabase db;
      db.Open(fullpath);
      CDaoTableDef td(&db);
      td.Open(pArg->resval.rstring);
      CDaoRecordset rs;
      rs.Open(&td,dbOpenTable,0);
      char arrstr;
      struct resbuf *head=0,*eb1=0,*eb2=0;
      int j=0;
      while(!rs.IsEOF())
      {
                eb1=new resbuf;
                eb1->rbnext=NULL;
                eb1->restype = RTLB;
                if(eb2!=NULL)
                {
                        eb2->rbnext=eb1;
                        eb2=eb1;
                }
                for(int i=0;irbnext=eb1;
                              eb2=eb1;
                        }
                        eb1=new resbuf;
                        eb1->rbnext=NULL;
                        strcpy(arrstr,V_BSTRT(&(rs.GetFieldValue(i))));
                        eb1->resval.rstring = arrstr;
                        eb1->restype = RTSTR;
                        eb2->rbnext=eb1;
                        eb2=eb1;
                }
                eb1=new resbuf;
                eb1->restype = RTLE;
                eb1->rbnext=NULL;
                eb2->rbnext=eb1;      
                eb2=eb1;
                rs.MoveNext();
                j++;
      }
      rs.Close();
      td.Close();
      db.Close();
      eb2->rbnext=NULL;
      acedRetList(head);
      delete(eb1);
      return (RTNORM) ;
}

goldenshin 发表于 2003-2-13 17:56:00

Because you used : CDaoDatabase ; you must install it firstly.
you can download something from the below web to install:
http://www.microsoft.com/data/download_250rtm.htm
页: [1]
查看完整版本: 求助