You don't connect to Access database (or any other database) in Orion. You use JDBC in your servlet. Then you can put your servlet on whatever webserver you want, Orion, Tomcat, JRun, or another server.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Oct 08, 2002
Thanks for ur reply. Actually that is exactly what I meant. I am trying to use JDBC in my servlet.I am giving the code
My orion data-sources.xml <data-source class="com.evermind.sql.DriverManagerDataSource" name="Test data-source" location="jdbc/TestCoreDS" xa-location="jdbc/xa/TestXADS" ejb-location="jdbc/Test" connection-driver="sun.jdbc.odbc.JdbcOdbcDriver" username="" password="" url="jdbc dbc:test.mdb" schema="database-schemas/ms-access.xml" inactivity-timeout="30"> </data-source> But it gives me data not found error...I am going crazy. Can u help. The docs don't help. I am thinking of uninstalling orion.'coz Tomcat seems to have better docs. What is ur suggestion. Archana [ November 12, 2002: Message edited by: Marilyn de Queiroz ]
Why don't u try Loading the Driver into Memory using the traditional Class.forName() method . and then use the getConnection() of DriverManager to get u'r connection objects insted of using a DataSource. You could also use one of the Connection Pooling mechanism's to dispense u'r connection Objects instead of Creating & taking down connection's in The doGet() method . Another Benifit is that if tommorow u can still configure u'r DataSource to return connections , u could Just change the implementation in u'r Connection Pool Class.. Hope this helps .
Marilyn de Queiroz
Joined: Jul 22, 2000
I think I would create the connection in the Servlet rather than in the xml descriptor. You might find this page helpful.
You are trying to pull the ejb-location DS, and perhaps you've chosen a driver class that doesn't "go" with ejb-location.
Also, what is the EXACT error message (Stack trace) that you are getting, and where is it appearing?
Joined: Oct 08, 2002
Hi, Thanks for all ur responses. I tried using DataSource ds = (DataSource) ctx.lookup("jdbc/TestCoreDS"); And I get the following error... Entering hijdbc/Test connection I am here before Stmt java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in my browser when I run the servlet. As far as connection pooling goes. I am yet to read up on them. Thanks, Archana
That sounds a lot like your DataSource is configured correctly in Orion, but you haven't entered a proper DSN in Windows.
Because you're using the jdbc/odbc bridge, you need to make sure your Access database has a system DSN. (your connection URL has "jdbcdbc:test.mdb", and 'test.mdb' is the DSN that the driver will look for.
I've never used the jdbc/odbc bridge before, so I can't tell if that's a properly formed URL, but it looks like you've just specified a file name (without even a path). This probably won't work. [ November 13, 2002: Message edited by: Mike Curwen ]