Вопрос

Here my code

   #ifndef FL_PROJECTMNT
   #include <afxdao.h>

   #if ENGLISH
   #define PROJECT      "Project" // Project
   #define NUMBER       "No"
   #define PRJNAME      "Project Name"

   #else
   #define PROJECT  "プロジェクト"
   #define NUMBER   "No"
   #define PRJNAME  "プロジェクト名"

   #endif

   #ifdef ENGLISH
  #define RESBAMELIST      NUMBER,PRJNAME,CNTNAME,TANTOU,PREV,SREV,LASTCTIME,NOTE,DOCNO,PLANTNAME,BUNSATU,MEMTYP,CMPCNT,PLASTCTIME,LINENOCNT,SVCHANGCNT
    #else
    #define RESBAMELIST NUMBER,PRJNAME,CNTNAME,TANTOU,PREV,SREV,LASTCTIME,NOTE,DOCNO,PLANTNAME,BUNSATU,MEMTYP,CMPCNT,PLASTCTIME,LINENOCNT,SVCHANGCNT,USECADINF
   #endif
    class AFX_EXT_CLASS ProjectMnt{
    private:
CDaoDatabase Project;
CDaoRecordset *rec;
int state;
      public:
ProjectMnt();
ProjectMnt(char* strPath);
~ProjectMnt();
int RenewLRDate();
int RenewPLRDate();
int GetProjectInfo(int kind,int size,char *data);
int GetProjectInfo(int kind,long int *data);
int SetProjectInfo(int kind,char* data);
int SetProjectInfo(int kind,long int data);
int GetState(){return state;};      
     };
     #define FL_PROJECTMNT
     #endif

When I complie on Visual Studio 2008 it give this warning but i can not slove, Some body help me? warning C4995: 'CDaoDatabase': name was marked as #pragma deprecated

Это было полезно?

Решение

It says that you are using a deprecated type that might not be supported in a future release of Visual Studio.

DAO seems to have been deprecated by Microsoft for quite a while. A quick Google search shows people having your problem as early as .NET 2003. Obviously they don't want people to use it anymore and rather encourage them to switch to ADO.NET or something else. So if you are not locked into DAO, I'd recommend exploring other database options.

However, as CDaoDatabase is still present in the documentation for VS 2012 and even 2013 Preview I think you can safely ignore that warning if you really have to use DAO. Seems like it will be supported for a little while longer.

Другие советы

You don't need the include of afxdao.h anymore.

Just remove this line and it should work.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top