Board index » delphi » Delphi ISAPI and SQL Server 7

Delphi ISAPI and SQL Server 7

I'm going to repost this.  Please help!

On my NT web server, I have Delphi 4 C/S installed.

I can write an ISAPI DLL that works fine with Paradox tables.  I'm trying to
change everything over to SQL Server 7.

I have an ODBC alias set up.  I can write a regular windows app with nothing
but a ttable component and list box, and I can display the table's contents
easily---it asks for the SS7 login and then works fine.  No problem.  I can
get then rid of the login prompt with a tdatabase component---still works
fine.

OK...start a new ISAPI DLL.  It works fine returning nothing but text
through one action.  When I add a tdatabase component, I set the ODBC alias,
then give the Database name X.  The component sees the database, and I can
connect to it.  I haven't even done any access to it---the DLL still returns
only text with the only action I have set for it---but the web page now
returns:

Exception: EDBEngineError
Message: Unknown database. Alias: x

This is getting really infuriating.  Why do windows apps work fine, and why
can the tdatabase component on this SIMPLE isapi app see the database at
design time, but NOT AT RUN TIME???  I've tried everything for two days now,
and I'm ready to tear Bill a new one.

I'm running IIS4 on NT SP6.  No other problems of any kind...

*Please* help!  This should be so *simple*...

 

Re:Delphi ISAPI and SQL Server 7


On which form have you placed the TDatabase component ? Is this form created
BEFORE you are creating the form with the TTable component (or are they on
the same form) ?

"JonnyCab?" <gtpant...@buffnetnospam.net> schreef in bericht
news:Oer35.43300$Q7.875886@news-east.usenetserver.com...

Quote
> I'm going to repost this.  Please help!

> On my NT web server, I have Delphi 4 C/S installed.

> I can write an ISAPI DLL that works fine with Paradox tables.  I'm trying
to
> change everything over to SQL Server 7.

> I have an ODBC alias set up.  I can write a regular windows app with
nothing
> but a ttable component and list box, and I can display the table's
contents
> easily---it asks for the SS7 login and then works fine.  No problem.  I
can
> get then rid of the login prompt with a tdatabase component---still works
> fine.

> OK...start a new ISAPI DLL.  It works fine returning nothing but text
> through one action.  When I add a tdatabase component, I set the ODBC
alias,
> then give the Database name X.  The component sees the database, and I can
> connect to it.  I haven't even done any access to it---the DLL still
returns
> only text with the only action I have set for it---but the web page now
> returns:

> Exception: EDBEngineError
> Message: Unknown database. Alias: x

> This is getting really infuriating.  Why do windows apps work fine, and
why
> can the tdatabase component on this SIMPLE isapi app see the database at
> design time, but NOT AT RUN TIME???  I've tried everything for two days
now,
> and I'm ready to tear Bill a new one.

> I'm running IIS4 on NT SP6.  No other problems of any kind...

> *Please* help!  This should be so *simple*...

Re:Delphi ISAPI and SQL Server 7


Quote
"M.H. Avegaart" <avega...@NOSPAMmccomm.nl> wrote in message

news:8in6qa$7e0$1@porthos.nl.uu.net...

Quote
> On which form have you placed the TDatabase component ? Is this form
created
> BEFORE you are creating the form with the TTable component (or are they on
> the same form) ?

With an ISAPI DLL, there's only one form (at least to start).

Like I said, if I have no DB components, or if I have DB components using
Paradox tables, IIS4 works fine---and so does the site.

Even when I start a new ISAPI DLL, point a DB component to the SS7 DB,
everything works---at design time.  The components see the database and
tables, they connect, they can be set to active, and everything seems OK.
When I access the site, the IIS4 returns "internal server error".

Grrr...

Re:Delphi ISAPI and SQL Server 7


Did you install BDE Admin on the server, and if so, did it "see" you
database and could  connect to it ??

JonnyCab? <gtpant...@buffnetnospam.net> a crit dans le message :
Oer35.43300$Q7.875...@news-east.usenetserver.com...

Quote
> I'm going to repost this.  Please help!

> On my NT web server, I have Delphi 4 C/S installed.

> I can write an ISAPI DLL that works fine with Paradox tables.  I'm trying
to
> change everything over to SQL Server 7.

> I have an ODBC alias set up.  I can write a regular windows app with
nothing
> but a ttable component and list box, and I can display the table's
contents
> easily---it asks for the SS7 login and then works fine.  No problem.  I
can
> get then rid of the login prompt with a tdatabase component---still works
> fine.

> OK...start a new ISAPI DLL.  It works fine returning nothing but text
> through one action.  When I add a tdatabase component, I set the ODBC
alias,
> then give the Database name X.  The component sees the database, and I can
> connect to it.  I haven't even done any access to it---the DLL still
returns
> only text with the only action I have set for it---but the web page now
> returns:

> Exception: EDBEngineError
> Message: Unknown database. Alias: x

> This is getting really infuriating.  Why do windows apps work fine, and
why
> can the tdatabase component on this SIMPLE isapi app see the database at
> design time, but NOT AT RUN TIME???  I've tried everything for two days
now,
> and I'm ready to tear Bill a new one.

> I'm running IIS4 on NT SP6.  No other problems of any kind...

> *Please* help!  This should be so *simple*...

Re:Delphi ISAPI and SQL Server 7


Jonny,

   Sounds very irritating.  "Who" is accessing the site via IIS?  Is
the username "Anonymous" and if so, does Anonymous have access to SS7?  
If not then the BDE will throw an exception which, if not caught, I
believe results in an "Internal Server Error".  I should try a test app
with a TDatabase, connected = false & a single TTable, active=false at
design time.  In the default action handler:

try
  Database1.Connected := true;
  Table1.active := true;
  Response.Content := 'Success';
except
  on E: Exception do
    Response.Content := e.Message;
end;

This might shed some light.

HTH,
Gerald.

Re:Delphi ISAPI and SQL Server 7


This might sound stupid but it appears that you get the login dialog for sql
server popping up in your test application - if this happens in the ISAPI
then you will not see the login dialog...  Have you got login prompt set to
false and set the user name and password variables in the tdatabase?   Then
in the webmodule open the Tdatabase...

Quote
JonnyCab? <gtpant...@buffnetnospam.net> wrote in message

news:Oer35.43300$Q7.875886@news-east.usenetserver.com...

Quote
> I'm going to repost this.  Please help!

 On my NT web server, I have Delphi 4 C/S installed.

Quote
> I can write an ISAPI DLL that works fine with Paradox tables.  I'm trying

to
 change everything over to SQL Server 7.

Quote
> I have an ODBC alias set up.  I can write a regular windows app with

nothing
 but a ttable component and list box, and I can display the table's contents
 easily---it asks for the SS7 login and then works fine.  No problem.  I can
 get then rid of the login prompt with a tdatabase component---still works
 fine.

Quote
> OK...start a new ISAPI DLL.  It works fine returning nothing but text

 through one action.  When I add a tdatabase component, I set the ODBC
alias,
 then give the Database name X.  The component sees the database, and I can
 connect to it.  I haven't even done any access to it---the DLL still
returns
 only text with the only action I have set for it---but the web page now
 returns:
Quote

Re:Delphi ISAPI and SQL Server 7


Quote
"Gerald Welsby" <gwel...@compuserve.com> wrote in message

news:VA.0000003a.42a578b9@compuserve.com...

Quote
> Jonny,

>    Sounds very irritating.  "Who" is accessing the site via IIS?  Is
> the username "Anonymous" and if so, does Anonymous have access to SS7?
> If not then the BDE will throw an exception which, if not caught, I
> believe results in an "Internal Server Error".  I should try a test app
> with a TDatabase, connected = false & a single TTable, active=false at
> design time.  In the default action handler:

It was the alias name.  I can't believe I was dumb enough to give the DB a
*user* alias instead of a *system* alias.  I'm ashamed to even admit it.
Grrr...

Thanks for the help.

Other Threads