Board index » delphi » Problem using same db alias for web app & desk app at same time

Problem using same db alias for web app & desk app at same time


2003-11-07 06:30:19 AM
delphi139
Hello All,
I was hoping that someone may have an idea of why I am having a problem.
Any suggestions would be appreciated. Thanks in advance. Here is the
scenario:
-I have an ISAPI webapplicatition that uses my "music" db and is on my
server.
-I have a desktop application that uses the same db and often run it
directly on the server.
1) The problem is that while they both work fine on their own, when the
desktop application is open on the desktop, the webapplication stops
working, giving the following error in the browser:
2) "Exception: EDBEngineError
Message: An error occurred while attempting to initialize the BDE (error
$2501)"
At this point the server keeps working, just not when it calls the BDE..
3) Once I shut down the desktop application and try to hit the webserver
again, the webserver shuts down.
4) I can then restart the webserver and everything is fine.
Troubleshooting:
-I have another desktop application that hits the same database (although it
is only a handful of tables) and this doesn't affect the ISAPI Application
-If I open the desktop application on a different machine (hitting the same
db on the server). It doesn't affect the ISAPI application.
Here are some Tech Specifics:
-Server NT 4.0
-IIS 4.0
-DB Tables in database used by the problem programs>30
-Tables are Paradox 7.0
-Generally there are only 1 - 2 users hitting the db at a time.
 
 

Re:Problem using same db alias for web app & desk app at same time

Ray Norrish writes:
Quote
You should be aware that the BDE is not now supported, and that it is
definately not recommended for Web access.
If you use PDX files, then you will (should know) about the .LCK file
that needs to be created when tables are openned for write access etc.
This is not TRUE. Only BDE SQL Links is no longer supported. BDE for
local files (Paradox, dBase) will still be supported and perhaps even
maintained in a future release.
Quote
It is HEAVILY recommended to not use the BDE to develop web
applications in delpi, and also not to use flat DB files either.
True. Don't use BDE in a web app
Quote
Rather a DB such as Sybase or MS SQL.
Interbase or Firebird might be an option also. Firebird is free, IB is
not.
cheers,
JED
 

Re:Problem using same db alias for web app & desk app at same time

Ray Norrish writes:
Quote
Goodbye BDE for me..
That's fine, but your spreading misinformation stating that it is dead.
Quote
and anyway.. it is still a poor choice for web applications.
I agreed with that.
JED
 

Re:Problem using same db alias for web app & desk app at same time

Hello Ross,
You are ALWAYS going to experience problems with Web Apps and BDE in this
scenario.
You should be aware that the BDE is not now supported, and that it is
definately not recommended for Web access.
If you use PDX files, then you will (should know) about the .LCK file that
needs to be created when tables are openned for write access etc.
This causes problems, not only when a desktop app wants access (but cannot
see the .LCK file) and the rights of the web app to create/manage the .LCK
file.
It is HEAVILY recommended to not use the BDE to develop web applications in
delpi, and also not to use flat DB files either. Rather a DB such as Sybase
or MS SQL.
Ray
"Ross French" <XXXX@XXXXX.COM>writes
Quote
Hello All,

I was hoping that someone may have an idea of why I am having a problem.
Any suggestions would be appreciated. Thanks in advance. Here is the
scenario:

-I have an ISAPI webapplicatition that uses my "music" db and is on my
server.
-I have a desktop application that uses the same db and often run it
directly on the server.

1) The problem is that while they both work fine on their own, when the
desktop application is open on the desktop, the webapplication stops
working, giving the following error in the browser:
2) "Exception: EDBEngineError
Message: An error occurred while attempting to initialize the BDE (error
$2501)"
At this point the server keeps working, just not when it calls the BDE..
3) Once I shut down the desktop application and try to hit the webserver
again, the webserver shuts down.
4) I can then restart the webserver and everything is fine.

Troubleshooting:
-I have another desktop application that hits the same database (although
it
is only a handful of tables) and this doesn't affect the ISAPI Application
-If I open the desktop application on a different machine (hitting the
same
db on the server). It doesn't affect the ISAPI application.

Here are some Tech Specifics:
-Server NT 4.0
-IIS 4.0
-DB Tables in database used by the problem programs>30
-Tables are Paradox 7.0
-Generally there are only 1 - 2 users hitting the db at a time.


 

Re:Problem using same db alias for web app & desk app at same time

Quote
>You should be aware that the BDE is not now supported, and that it is
>definately not recommended for Web access.
>If you use PDX files, then you will (should know) about the .LCK file
>that needs to be created when tables are openned for write access etc.

This is not TRUE. Only BDE SQL Links is no longer supported. BDE for
local files (Paradox, dBase) will still be supported and perhaps even
maintained in a future release.

perhaps.. I`m not prepared to acknowledge that commercially :)
Goodbye BDE for me..
and anyway.. it is still a poor choice for web applications.
Ray
 

Re:Problem using same db alias for web app & desk app at same time

I think Ray's point is that "for all practical purposes" the BDE *is* dead.
The fact that Borland may be supporting it for backward compatibility does
not make it a viable entity. It is obvious that most of the questions posted
in these news groups come from either beginner programmers or power
programmers trying to push the envelope and needing some technical wisdom
from other power programmers. I think Ray is dead on to warn and encourage
newbies to run from the BDE at all possible speed. Its not misinformation,
its good advise. I rank Paradox in with DBase, Clipper, early Foxpro etc.
They are dead.