Solved

BDE Error at Run-time

Posted on 1999-01-28
4
181 Views
Last Modified: 2012-05-04
Hi everyone

Got this really descriptive error once again in Delphi yesterday and was wondering if any of you have come accross this before or could explain WHY this error occurs and what it means.

Here's the error message :

Project MovieDB.exe raised exception class EDBEngineError with message 'Number is out of range. Table: E:\SourceCode\MovieDB\Main\bk00001.DB'. Process Stopped Use Step or Run to continue.

Now what my code does - that caused this error - is it creates a table in run-time as follows: (The error occurs on the CreateTable line)

FoundIt := FileSearch(tableFileName, CorrectedPath);
if FoundIt='' then
  begin
    with dataModule1.tblBookings do
      begin
        TableName:=CorrectedPath+tableFileName;
        tableType:=ttParadox;
        with FieldDefs do
          begin
            Clear;
            Add('Customer', ftString, 6, false);
            Add('Booked Date', ftString, 50, false);
          end;
        with IndexDefs do
          begin
            Clear;
            Add('', 'Booked Date', [ixPrimary, ixUnique]);
          end;
        try
          dataModule1.tblBookings.Active:=false;
          dataModule1.tblBookings.Exclusive:=true;
          CreateTable;
          dataModule1.tblBookings.Active:=true;
          Append;
          FieldValues['Customer'] := dataModule1.tblCustomers.FieldByName('Code').AsString;
          FieldValues['Booked Date'] := DateToStr(dateTimePicker1.Date);
          Post;
          dataModule1.tblBookings.Active:=false;
          dataModule1.tblBookings.Exclusive:=false;
        except
          MessageDlg('Error creating booking table '+tableName, mtWarning, [mbOK], 0);
          exit;
        end;
      end;
  end;

Suggestions, comments are more than welcome since the Help file isn't helpful at all in this regard - unless I'm missing something here.

Thanks in advance.
0
Comment
Question by:CyberSoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1363740
Hi Cybersoft,

two suggestions

1. the primaryIndex should be the first field in the Table.
2. Maybe your CustomerString is to long.

meikl
0
 
LVL 3

Author Comment

by:CyberSoft
ID: 1363741
Meikl

Thank you once again my friend - you have saved me from a dilema. Silly me seeing that I did not change the order of creating the fields after I changed which field I wanted as the Primary Index.

Please post another comment as your answer and I'll give you the points.

Thanks once again!
Demitri
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 20 total points
ID: 1363742
Hi Demitri,

it seems your Project becomes a great dimension.
Good luck again, and i wish you a very happy end by your project.

meikl
0
 
LVL 3

Author Comment

by:CyberSoft
ID: 1363743
Thanks once again Meikl appreciate the comments. I'm noticing now more than ever that this (what seemed at first a simple task) has become more and more complicated. But thanks to your help (and others) I can continue to work on it and improve it!

Best of luck to you and your projects too!

Demitri

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question