Hi,
I have the same proble with apache 1.3.6 with J-serv.
If I run an application with jdbc and odbc Bridge for DB2 for SNA It's all
rigths.
But if I do this from a servlet It doesn't function. It's not all! If I do
this in another NT
with the same configuration of Apache e Jserv  with an a SNA Client and not
directly on a sna server
It works! Yahoo! It's incredible. I think in some Nt with SNA or other
configuration there are some other
hidden authentification policy that blocks sql access with servlet. Perhaps.
But is good to work with NT and APAche? Is it better than IIS and Jrun?
If I work with a SNA Server I think It's like a Database server. Is it good
use another NT as web server with a SNA client?
Thank you for all.
Ahhh Thank you also for Servlet-excel example but I'haven't a form I need an
exaple with Content type of response .
Bye. kind regards.
Ciao.



-----Messaggio originale-----
Da: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]Per conto di Srini
Sathya.
Inviato: venerd� 28 luglio 2000 17.55
A: [EMAIL PROTECTED]
Oggetto: Re: Problem connecting to MS Access database on NT using ODBC
bri dge


did u made ur datasource as SYSTEMDSN.  For servlets it has to be SYSTEM
DSN.

Cheers
Srini

-----Original Message-----
From: Brian Mrkonjic [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 28, 2000 1:08 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem connecting to MS Access database on NT using ODBC
bridge


Hi Rajesh,

Yes, the datasource is defined on the server. If I run the same code as a
Java program, on the server, it connects to the databse successfully. If I
run the code from within a servlet, on the same server, it gives me an
error.

Brian


>From: "SHEDDE, RAJESH" <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>        Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Problem connecting to MS Access database on NT using ODBC
>         bridge
>Date: Thu, 27 Jul 2000 15:56:42 -0400
>
>Since the servlet is executing on the server, is the odbc datasource
>defined on
>the server machine ?
>
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>Hi,
>
>I have encountered a problem when attempting to connect to a MS Access
>database hosted on an NT Server running JRun using a servlet. I have
>created
>an ODBC datasource for the Access database on the NT server.
>
>I first used a simple Java program to connect to the database and output
>some records from a table. It executed successfully.
>
>I then used the identical code in a simple servlet. The code snippet for
>connecting to the database is as follows:
>
>      // The name of the JDBC driver to use
>      String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
>
>      // The JDBC connection URL
>      String connectionURL = "jdbc:odbc:MyAccessDataSource";
>
>      try {
>
>         // Create an instance of the JDBC driver so that it has
>         // a chance to register itself
>         Class.forName(driverName).newInstance();
>
>         // Create a new database connection.
>         con = DriverManager.getConnection(connectionURL);
>
>         ...
>
>At this point in the execution, I get the following error message:
>
>Exception! java.sql.SQLException: [Microsoft][ODBC Microsoft Access
>Driver]General error Unable to open registry key 'DriverId'. at
>sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code) at
>sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246) at
>sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1136) at
>sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:148) at
>sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:167) at
>java.sql.DriverManager.getConnection(Compiled Code) at
>java.sql.DriverManager.getConnection(DriverManager.java:159) at
>EmployeeList.query(EmployeeList.java:148) at
>EmployeeList.doGet(EmployeeList.java:66) at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:516) at
>javax.servlet.http.HttpServlet.service(Compiled Code) at
>com.livesoftware.jrun.JRun.runServlet(Compiled Code) at
>com.livesoftware.jrun.JRunGeneric.handleConnection(Compiled Code) at
>com.livesoftware.jrun.JRunGeneric.handleProxyConnection(Compiled Code) at
>com.livesoftware.jrun.service.proxy.JRunProxyServiceHandler.handleRequest(C
ompiled
>
>Code) at com.livesoftware.jrun.service.ThreadConfigHandler.run(Compiled
>Code)
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to