Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BDE Error Code

Status
Not open for further replies.

ACCESSDUMMY

Programmer
Oct 22, 2003
33
US
Is there a limit to the number of aliases that you can store in the bde file? I'm at a point to where when I try to add another alias to the bde, I get a message saying "cannot write to engine configuration file". I think the code was 8453. Does anyone know how to get around this?
Thanks in advance!
 
AccessDummy,

AFAIK, there are no documented limits to the number of aliases in a single BDE.CFG file. (The documented limits can be found at
The error you described seems fairly descriptiive and I would check for things that would prevent a process from replacing the existing .CFG file. Some ideas include:

1. Your user account doesn't have complete read/write access to the .CFG file or the directory containing it. This is a network or Windows rights issue and you'd need to verify the rights to determine if this is the problem.

2. The drive containing .CFG file is out of space.

3. The .CFG is being used by another process and/or user, e.g. someone else is running Paradox, BDE Administrator, or some other BDE-aware program. All users and processes need to be out of the .CFG file before it can be replaced.

It is possible you've discovered a new limit, however, with no idea about the number of aliases you've defined, it's hard to say how possible that really is.

There are a few different ways to work around this:

1. Use separate .CFG files to collect aliases for different projects and then use the -o command-line switch in your Paradox shortcuts to choose the appropriate .CFG file the application being started.

2. Use project (temporary) aliases instead of public aliases. I've used these in most of my Paradox applications and found they greatly reduce the amount of maintenance and
troubleshooting generally associated with Paradox and/or BDE applications.

Project aliases can be created with ObjectPAL and are best defined as part of a startup script that launches the main form of the application when the aliases are defined.

Here's a sample startup.ssl script that I've used in my applications:

Code:
method run(var eventInfo Event)
var
   strWorkDir  String ; Holds fully qualified working dir path.
   fmMain  Form       ; Variable used to open the main menu form.
   libApp  Library    ; Holds standard routines for application.
   loStay  Logical    ; Inidactes whether or not to exit Paradox.
endVar

   ; global settings
   setRetryPeriod( 0 )
   ignoreCaseInStringCompares( Yes )

   ; define the required aliases for the application
   strWorkDir = workingDir()
   If strWorkDir.subStr( strWorkDir.size(), 1 ) = "\\" then
      strWorkDir = strWorkDir.subStr( 1, strWorkDir.size() - 1 )
   endIf

   addProjectAlias( "MAIN", "Standard", strWorkDir )
   addProjectAlias( "FORMS","Standard", strWorkDir + "\\FORMS" )
   addProjectAlias( "RPTS", "Standard", strWorkDir + "\\RPTS" )
   addProjectAlias( "LIBS", "Standard", strWorkDir + "\\LIBS" )
   addProjectAlias( "DATA", "Standard", strWorkDir + "\\DATA" )

;   addProjectAlias( "UTILS","Standard", strWorkDir + "\\UTILS" )
;   addProjectAlias( "QBE",  "Standard", strWorkDir + "\\QBE" )
;   addProjectAlias( "DATAX","Standard", strWorkDir + "\\DATA" )
;   addProjectAlias( "DOCS", "Standard", strWorkDir + "\\DOCS" )
;   addProjectAlias( "SYS",  "Standard", strWorkDir + "\\SYS" )

   addProjectAlias( "PIX",   "Standard", strWorkDir + "\\PIX" )

   ; start the application and wait for the user to exit.
   If not fmMain.open( ":FORMS:DESKTOP" ) then
      errorShow( "Can't Start Application",
                 "Reason: Could not open the Main Menu; see details..." )
   else
      loStay = fmMain.wait()
   endIf

   ; Close all complex variable references, using techniques that
   ; avoid run-time errors.
   If fmMain.isAssigned() then
      try
         fmMain.close()
      onFail
         ; do nothing as the form is already closed
      endTry
   endIf

   ; Remain in Paradox or exit completely?
   If not loStay then
      exit()
   endIf

endmethod

I use this for my applications by adding it to the shortcut. For more information, please see which douments Paradox's command-line switches.

Hope this helps...

-- Lance
 
Hi Lance,
Thanks for all your help. I don't think it's my user account, because I have administrator privileges. I also don't think it's the drive being out of space, because I have the .cfg file saved on a network drive. Your third idea is possible because I'm working on a file that many people share in order to use their Paradox applications, but to me it's odd that I can delete one out, and then add a new one in just fine, but if I try to add more aliases than what I delete out, then I can't save the file.
I did look at the link you had to the dbcommunity site with the Paradox limitations. From there, I checked the size of the .cfg file in question, and saw that it's 48KB, so maybe that's the problem. Maybe adding just one more alias would be bumping it up in size and Paradox won't allow that. I think at the time I was trying to add another alias, I already had around 124 existing aliases. Since then I've cleaned out old aliases that are no longer used, so we've got extra space for more now. I'll keep a check on it to see how many we get to before we run out of space again.

Thanks,
Amy
 
Amy,

Wow, I hadn't even seen that limit. I'll play with it on this end and see what I find.

Thanks for posting a follow-up.

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top