You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mick Sullivan <mi...@hotmail.com> on 2001/03/08 11:27:35 UTC

CONNECTING TO MS ACCESS DB?

Hi all,
Does anyone know where i could find code (or documentation) that would 
enable my JSP pages to connect to a MS ACCESS Database?
I have all the JSP pages (with beans) submitting and requesting information 
via response pages, now i just need to set the project up with a database.
Any Help at al would be greatly appreciated.
Thanks in advance, Mick
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Re: CONNECTING TO MS ACCESS DB?

Posted by Jinan Li <le...@hotmail.com>.
use database connection (ODBC-JDBC or JDBC).

Jack
----- Original Message -----
From: Mick Sullivan <mi...@hotmail.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, March 08, 2001 2:27 AM
Subject: CONNECTING TO MS ACCESS DB?


> Hi all,
> Does anyone know where i could find code (or documentation) that would
> enable my JSP pages to connect to a MS ACCESS Database?
> I have all the JSP pages (with beans) submitting and requesting
information
> via response pages, now i just need to set the project up with a database.
> Any Help at al would be greatly appreciated.
> Thanks in advance, Mick
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


R: CONNECTING TO MS ACCESS DB?

Posted by Garry De Toffoli <ga...@telemar.it>.
I think that you wold configure an ODBC instance that point to your MSAccess
DB;
this new instance must be passed as the url parameter at
DriverManager.GetConnection.

Bye.


----- Original Message -----
From: Mick Sullivan <mi...@hotmail.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, March 08, 2001 11:27 AM
Subject: CONNECTING TO MS ACCESS DB?


> Hi all,
> Does anyone know where i could find code (or documentation) that would
> enable my JSP pages to connect to a MS ACCESS Database?
> I have all the JSP pages (with beans) submitting and requesting
information
> via response pages, now i just need to set the project up with a database.
> Any Help at al would be greatly appreciated.
> Thanks in advance, Mick
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Re: CONNECTING TO MS ACCESS DB?

Posted by Maverick <ma...@gmx.de>.
hi hi!

this is quite easy....
create a odbc connection for the access file. you can find the odbc sources in the control panel.
give the connection a name, i.e. "mydb"

then use the following code:



   Connection conn;

   try 
   {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
   } 
   catch (ClassNotFoundException e) 
   {
        // can only happen when your java installation is not complete. i think...
   }

   try 
   {
         conn = DriverManager.getConnection("jdbc:odbc:mydb", "myusername", "mypassword");
        // if your odbc connection has another name use: "jdbc:odbc:your_odbc_name_here"
   } 
   catch (Exception e) 
   {
        // happens only it the odbc connection is not correct or the db is missing or the user and pw are wrong
   }


now you can use conn to create Statements...

bye, adrian.



  ----- Original Message ----- 
  From: Mick Sullivan 
  To: tomcat-user@jakarta.apache.org 
  Sent: Thursday, March 08, 2001 11:27 AM
  Subject: CONNECTING TO MS ACCESS DB?


  Hi all,
  Does anyone know where i could find code (or documentation) that would 
  enable my JSP pages to connect to a MS ACCESS Database?
  I have all the JSP pages (with beans) submitting and requesting information 
  via response pages, now i just need to set the project up with a database.
  Any Help at al would be greatly appreciated.
  Thanks in advance, Mick
  _________________________________________________________________________
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
  For additional commands, email: tomcat-user-help@jakarta.apache.org