Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Codebase > Re: Codebase er...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 290 of 310
Post > Topic >>

Re: Codebase error -310 on Windows 2003 Server platform

by njlees@[EMAIL PROTECTED] Jan 8, 2008 at 05:57 AM

This program gives more details on the exact error after the d4pack:
Error Number  -70, 90621

int DoReindex(int argc, _TCHAR* argv[])
{
     int rc=0, reindex_count=0;
     USHORT options = 0;
     char function[256];
     char filename[256];

     memset(function, 0, 256);
     memset(filename, 0, 256);

     if (argc != 4)
          return printf("Usage: %s REINDEX TARGET COUNT.\n", argv[0]);

     strcpy(filename, argv[2]);
     reindex_count = atoi(argv[3]);

     CODE4 settings;
     code4init(&settings);
     settings.accessMode = OPEN4DENY_RW;
     settings.autoOpen = 1;
     code4largeOn(&settings);

     FILE *fpErrLog = fopen("Error.log", "w");
     if (!fpErrLog)
          return Re****tError("File Error.log could not be opened");

     error4file(&settings, "Error.log", 0);

     for (int i=1; i <= reindex_count; i++)
     {
          DATA4 *dbf = d4open(&settings, filename);
          if (!dbf)
              return HandleError(&settings, "Table %s cannot be opened.
\n", filename);

          TAG4 *tag = d4tagNext(dbf, NULL);
          while (tag)
          {
              printf("Selecting tag %s ... ", t4alias(tag));
              d4tagSelect(dbf, tag);
              HandleError(&settings, NULL, filename);
              d4top(dbf);
              HandleError(&settings, NULL, filename);
              Sleep(10);
              tag = d4tagNext(dbf, tag);
          }

          printf("Packing %s ... \n", filename);
          rc = d4pack(dbf);
          if (rc < 0)
              return HandleError(&settings, "Table %s cannot be
packed.", filename);
             /*   ERROR HERE
                after looping a few times (number of times before
failure varies) on same DBF file:
                Error Number  -70, 90621
                Reading File
                file4readError
             */
          else
              printf("Packing completed successfully.\n");

          rc = d4close(dbf);
          if (rc < 0)
              return HandleError(&settings, NULL);

          Sleep(1000);
     }

     fclose(fpErrLog);
     code4initUndo( &settings ) ;

     return 0;
}
 




 2 Posts in Topic:
Codebase error -310 on Windows 2003 Server platform
njlees@[EMAIL PROTECTED]   2008-01-07 15:33:47 
Re: Codebase error -310 on Windows 2003 Server platform
njlees@[EMAIL PROTECTED]   2008-01-08 05:57:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 11:28:10 CST 2008.