Problem related with open and close database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vibha
    New Member
    • Jun 2006
    • 2

    Problem related with open and close database

    Hello Everybody,

    i have application with ms-access database in vc++(MFC).while initializing
    database with different tables and corresponding fileds,one run time error
    message would throw that table name is not found even though it works
    properly in debug mode.as well as when i add one line
    Sleep(1000);
    in place where table name and field name is initialized.
    it goes in debug and release mode.
    i want to know the reason why this problem is arrived? as sleep is very
    temporiary solution for any big application .
    Any help would be appriciated.

    Thanks and regards
    Vibha
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi Vibha,

    what is your OS?? if your using anything OS below Win2K just make sure the c:\temp path exist.. coz i had the same problem when executing an exe created using vb.. i accidentally deleted the c:\temp folder and it gives an error "Network Drive Not Reachable".. funny rite..

    in the meantime i'll try to find solution for your problem.. give it a try..

    Comment

    • vibha
      New Member
      • Jun 2006
      • 2

      #3
      Problem related with open and close database

      Hi sashi
      I am using Windows XP OS.As per OS concern it doesnt have any problem.I checked in C:\temp path also it does exist.
      When application is going on why time is expired from mainframe class .
      it throw one database_open_e rror which shows table name is not found.
      please go through this code also.

      void CArchiveData::I nitTableFiledsI nfo(CABIADOXCon nection& Conn, const string& strTable)
      {
      CTableFieldsInf o TableFieldsInfo ;
      TableFieldsInfo .SetTableName(s trTable);
      // Sleep(1000);
      TableFieldsInfo .SetFields(GetF ieldsForTableFr omDB(Conn, strTable));
      GetTableFieldsI nfo().push_back (TableFieldsInf o);
      }

      if you have any idea then please guie me.
      Thanks and Regards
      Vibha

      Originally posted by sashi
      Hi Vibha,

      what is your OS?? if your using anything OS below Win2K just make sure the c:\temp path exist.. coz i had the same problem when executing an exe created using vb.. i accidentally deleted the c:\temp folder and it gives an error "Network Drive Not Reachable".. funny rite..

      in the meantime i'll try to find solution for your problem.. give it a try..

      Comment

      Working...