Web application using odbc. 
Author Message
 Web application using odbc.

Hi all:

This is a slightly complicated problem, so here goes:

        1) I am implementating a web application using odbc running
           under NT on both the client side and the server side.
        2) I have tested the database code on the client end
           and all works great.
        3) I move the binary over to the Enterprise Server and
           run the binary from the command line, and all is fine.
        4) I then launch the database executable on the server from
           the web browser, and I get an abnormal program termination.

        The error is occuring on either the open to the
        database or to the recordset.  I have yet to trace
        down the exact cause of the exception.  (I have taken out
        the database access, and all is well -- meaning I have
        established connectively from the browser to the server over
        http and the server is able to respond to the client's request.)
        It has been really difficult for me to debug on the server side.

        My questions are the following:
        1) Why would the program act differently when launched from
           the web browser?  Are paths not correct or are environment
           variables different?

        2) What is the best way to determine this problem?  I have
           put a sleep in the database process in order to attach to
           it, but have not yet figured out how to step through the
           source code. (I am new to Visual C++ and NT.)

I would really appreciate any input on this problem.  And I was
wondering if there is a news group that deals solely with web
applications.....

Thanks in advance!
Liz



Wed, 27 Oct 1999 03:00:00 GMT
 Web application using odbc.

Liz,

 >   1) Why would the program act differently when launched from
 >            the web browser?  Are paths not correct or are environment

More likely than not, your job fails because it runs under the SYSTEM
authority. It might be worth a try to log on as a real user -- either
by authenticating to the web server, or, if that fails, by calling
LogonUser(), ImpersonateLoggedOnUser(), do your thing, RevertToSelf(),
CloseHandle( logon_token ). Of course, there are a few security issues
involved, too ...

 >   2) What is the best way to determine this problem?

If you want the de{*filter*} to be started _with_ the process, you can do
so by creating a new registry key:

  HKLM\Software\microsoft\windows nt\currentversion\image file execution options\<yourfile.exe>

where <yourfile.exe> is just the filename+extension -- no path. In
this key, create a new value:

  De{*filter*}: REG_SZ: "windbg"  (or "msdev", or whatever)

To disable, rename the value. Note that, if your process runs under
SYSTEM authority, you will have to allow the service to interact with
the desktop.

Cheers,
Felix.

----------
If you post a reply, kindly refrain from emailing it, too.



Thu, 28 Oct 1999 03:00:00 GMT
 Web application using odbc.

Quote:

> Hi all:

> This is a slightly complicated problem, so here goes:

>         1) I am implementating a web application using odbc running
>            under NT on both the client side and the server side.
>    (...)2), 3), 4) (...)

        I had a problem with the same symptoms...

Quote:

>         The error is occuring on either the open to the
>         database or to the recordset.  I have yet to trace
>         down the exact cause of the exception.

        Wouldn't it be "Cannont open registry key "driverid""???

Quote:
> (...)
>         My questions are the following:
>         1) Why would the program act differently when launched from
>            the web browser?  Are paths not correct or are environment
>            variables different?

        It is very likely to be the same problem I had. The problem was that
the Enterprise Server (which I also use), runs on an WinNT account
different
from the account you used to test the application, calling it from
command
line.

        The problem I had (and I think you have it too) was that, when the
ODBC library functions try to establish connection with a data source,
they
need to access the registry. And it just happens that your account has
the
rights to access this, and the account the server is running under
doesn't
have.

Quote:
>         2) What is the best way to determine this problem?  I have
>            put a sleep in the database process in order to attach to
>            it, but have not yet figured out how to step through the
>            source code. (I am new to Visual C++ and NT.)

        If it is the case of this particular problem, try to make the
service Enterprise Server run under your personal account (or the
account
that you used to test the program from command line). This is a fairly
simple test that you can use to determine the error.

        If it doesnt work, make your application return the error codes,
since it seems to behave correctly, it just doesn't connect with odbc...
So you can figure out the error without the need of debugging and
breakpoints.

Quote:

> I would really appreciate any input on this problem.  And I was
> wondering if there is a news group that deals solely with web
> applications.....

        I am new tho this CGI/ODBC business, and I am having some
"strange behavior of applications" problems too. I just thought I
could help...

                                        Padovani



Sun, 07 Nov 1999 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. web databases on the web using ODBC sources

2. DC-Washington-265700--Web Applications-Software Engineer-ORACLE-XML-Web Application Software Engineer

3. DC-Washington-255187--Web Applications-Software Engineer-ORACLE-XML-Web Application Software Engineer

4. User Authentication in web application using Oracle 8i Roles

5. convert VB5 application to be used into Web as HTML

6. using a database in an web-application

7. Using Client Licenses with Web Application

8. Web based application crash when using a TDabase

9. Events Handling using Oracle Web Application Server

10. EOleSysError in a web application using MIDAS

11. Using Oracle Web Application Server to connect to SQL Server

12. Web application using VFP ?


 
Powered by phpBB® Forum Software