Language Drivers Errror?? Please Help ASAP

When system boots up client gets
"Language Drivers of table and index do not match"
It is a dBase IV table.
How do i fix this?
LVL 1
bozo7Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kretzschmarCommented:
hi bozo7,

two possibilities

1.drop the indexes and recreate again
2.select the language driver for the alias, with which the table(s) are created

try and let me know

meikl ;-)
0
kretzschmarCommented:
appendix,

to 1.
maybe you must delete the indexes via filesystem and not with the table-component

meikl
0
kretzschmarCommented:
hi bozo7,

if your index an .mdx (masterindex),
then you can do something like this

procedure TForm1.Button1Click(Sender: TObject);
var mystream : TFileStream;
    PB : Byte;
    SL : TStringList;
    s : String;
    oldIdxFNames : String;
begin
  table1.Close;
  oldIdxFNames := table1.IndexFieldNames; //prevent a EDatabaseError
  table1.IndexFieldNames := '';
  try
    Table1.Exclusive := True;
    Table1.Open;
  except
    On E : EDBEngineError do
    begin
      if (e.Errors[0].ErrorCode = 9997) or     //If Error Index not available
         (e.Errors[0].ErrorCode = 10049) then  //Language Driver Error
      begin
        try
          SL := TStringList.Create;    // Retrieve Path, only if an Alias is used
          session.GetAliasParams(Table1.DataBaseName,SL);
          s := SL.Values['PATH'];
          SL.Free;                    // End Retrieve Path
          if s[Length(s)] <> '\' then s := s+'\';
          if (e.Errors[0].ErrorCode = 10049) then  //delete mdx-index-file
          begin
            If FileExists(s+ChangeFileExt(Table1.TableName,'.MDX')) then
              if deletefile(s+ChangeFileExt(Table1.TableName,'.MDX')) then
              else
              begin
                Showmessage('Could not Delete '+ChangeFileExt(Table1.TableName,'.MDX'));
                exit;  //Leave Procedure
              end;
          end;
          MyStream := TFileStream.Create(S+Table1.TableName,
                                         fmOpenReadWrite or fmShareExclusive);
          MyStream.Position := 28;  // Patch KeyFlag
          PB := 0;
          MyStream.write(PB,1);
          MyStream.Free;
          try
            Table1.Open;  // Retry to Open
          except
            Showmessage('Could not open '+Table1.TableName);
            exit;  //Leave Procedure
          end;
        except
          Showmessage('Problem with File : '+s);
          exit;  //Leave Procedure
        end;
      end
      else
      begin
        Showmessage(e.Errors[0].Message);  //A other DBEngineError
        exit; //Leave Procedure
      end;
    end;
    On e : EDatabaseError do
    begin
      Showmessage(e.Message);  //A DatabaseError
      exit;  //Leave Procedure
    end
    else
    begin
      Showmessage('There was an error');  //A other Error
      exit;  //Leave Procedure
    end;
  end;
  Try  //it will guessed here that it is the first field
    table1.AddIndex(copy(Table1.Name,1,Length(Table1.Name)-4),Table1.Fields[0].FieldName,[ixUnique]);
    table1.IndexFieldNames := oldIdxFNames;
  except
    Showmessage('Cannot create Index');
  end;
end;

meikl
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

bozo7Author Commented:
I can't even open the table with Database Desktop. Well i can open it but i get an error message and then it is read only.
I suppose i could recreate the table. That would not be to bad.
0
kretzschmarCommented:
hi bozo,

try my code ;-)
if not work at first step,
then delete the .mdx file before by hand

meikl
0
bozo7Author Commented:
meikl,
Thank you so very much. I was looking forward to a day of banging my head against my monitor. Post an answer and you can have the points along with huge thanks.
How do you know all of this stuff? I suppose you work at alot and read alot.
0
kretzschmarCommented:
hi bozo,

glad that this helps you,
>you work at alot and read alot.
yup, and i try a lot (with sometimes horrible results ;-))
all this is a must in this part of buesiness
to be uptodate (and that is not so easy)

good luck again

meikl ;-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.