Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Database connection


Message #1 by "Piglet" <jsplistan@h...> on Wed, 18 Oct 2000 14:33:22 +0100
there are type 4 drivers available for access i am sure of that go to 
javasoft.com and in products and apis search for jdbc that would take you to 
jdbc home page there you might come across some ty4 driver for access 
otherwise you will have to put search and try microsoft.com put keywords 
jdbc or access andsee if they have type 4 driver , i am sure there are but 
sorry you wouldhave to search


>From: "Joe Fawcett" <joefawcett@h...>
>Reply-To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>Subject: [pro_jsp] Re: Database connection
>Date: Thu, 19 Oct 2000 13:09:58 BST
>
>Perhaps you could give a concrete example of connecting to an Access db
>without DSN and the odbc bridge? I've been trying to do this without
>success.
>
>Joe
>
>
>>From: "Ma, Eric" <Eric.Ma@C...>
>>Reply-To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>>To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>>Subject: [pro_jsp] Re: Database connection
>>Date: Wed, 18 Oct 2000 09:10:43 -0500
>>
>>What do you mean???
>>
>>In ASP, you first set up a system DSN using a particular ODBC driver, or
>>use
>>DSNless connection or OLE DB provider and in your code you do:
>>
>>Dim objConn
>>Dim strConn
>>Set objConn = Server.CreateObject("ADODB.Connection")
>>objConn.Open strConn
>>...
>>
>>IN JSP, you make sure the JDBC driver class (typically in a .jar or .zip
>>file) is in your classpath and you do:
>>
>>import java.sql.*;
>>...
>>String sClassName, sDBURL, SUID, sPWD;
>>try {
>>	Class.forName(sClassName);
>>	Connection objConn = DriverManager.getConnection(sDBURL, sUID,
>>sPWD);
>>}
>>catch (Exception e) {}
>>...
>>
>>JDBC is almost as easy to use as ADO/ODBC.  I suggest that you read the 2
>>chapters in the Pro_JSP book regarding JSP for ASP developers.
>>
>>Eric Ma
>>
>>-----Original Message-----
>>From: Esa [JSP-list] [mailto:jsplistan@h...]
>>Sent: Wednesday, October 18, 2000 11:49 AM
>>To: Pro_JavaServer_Pages
>>Subject: [pro_jsp] Re: Database connection
>>
>>
>>So there is no way like in ASP that you just make the whole connection in
>>the code? That doesn't make it very attractive to providers of web hotels
>>that wants to offer jsp instead of ASP?
>>
>>
>>Piglet
>>
>>
>> >From: "Ma, Eric" <Eric.Ma@C...>
>> >Reply-To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>> >To: "Pro_JavaServer_Pages" <pro_jsp@p...>
>> >Subject: [pro_jsp] RE: Database connection
>> >Date: Wed, 18 Oct 2000 08:37:34 -0500
>> >
>> >For MS Access, you have to use a JDBC-ODBC bridge.  For MS SQL Server,
>>you
>> >have choices among Type II, III, and IV JDBC drivers.  You can find the
>> >list
>> >of vendors at: http://industry.java.sun.com/products/jdbc/drivers.
>> >
>> >Eric Ma
>> >
>> >-----Original Message-----
>> >From: Piglet [mailto:jsplistan@h...]
>> >Sent: Wednesday, October 18, 2000 9:33 AM
>> >To: Pro_JavaServer_Pages
>> >Subject: [pro_jsp] Database connection
>> >
>> >
>> >My wish is to make a database connection without connecting it through
>>the
>> >ODBC. Anyone have sample code for such? I work with SQL-server and
>> >MsAccess. I'm a ASP-programmer new to JSP. Maybe its only possible in
>>ASP?
>> >
>> >Piglet
>> >
>> >---
>> >NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
>> >Visit EarthWeb for the latest in IT Management, Software Development,
>> >Web Development, Networking & Communications, and Hardware & Systems.
>> >Click on http://www.earthweb.com for FREE articles, tutorials,
>> >and discussions from the experts.
>> >
>> >---
>> >NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
>> >Visit EarthWeb for the latest in IT Management, Software Development,
>> >Web Development, Networking & Communications, and Hardware & Systems.
>> >Click on http://www.earthweb.com for FREE articles, tutorials,
>> >and discussions from the experts.
>> >
>>
>>_________________________________________________________________________
>>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>>
>>Share information about yourself, create your own public profile at
>>http://profiles.msn.com.
>>
>>
>>---
>>NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
>>Visit EarthWeb for the latest in IT Management, Software Development,
>>Web Development, Networking & Communications, and Hardware & Systems.
>>Click on http://www.earthweb.com for FREE articles, tutorials,
>>and discussions from the experts.
>>---
>
>>
>>---
>>NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
>>Visit EarthWeb for the latest in IT Management, Software Development,
>>Web Development, Networking & Communications, and Hardware & Systems.
>>Click on http://www.earthweb.com for FREE articles, tutorials,
>>and discussions from the experts.
>>
>>
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.msn.com.
>
>
>---
>NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
>Visit EarthWeb for the latest in IT Management, Software Development,
>Web Development, Networking & Communications, and Hardware & Systems.
>Click on http://www.earthweb.com for FREE articles, tutorials,
>and discussions from the experts.
>

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

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


  Return to Index