• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

r there any other way to connect to database

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai All,
R there any other way to connect database other than JDBC. if yes, pl. reply
Thanks in advance.
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if ur using java, u need dabase drivers that need to be compatible with java, which can be done using jdbc only.
------------------
I.K.VISHWANATH
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java Ranch has a naming policy, described here and "megalag" is not a valid name. Please choose one which meets the requirements.
Thanks.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is an .asp hybrid shortcut we have used on projects here where I work to pass data requests to a database and return disconnected recordsets.
Using java.net we open an .asp page as a document, passing stored procedure name and parameters as the querystring portion of the url (in a couple of cases we have passed simple sql), using ADO in the .asp to execute the query, and response.write'ing the result in a deliminited fashion easily parsible by the calling java class.
Its quick and easy for executing updates and returning disconnected recordsets, but won't, of course give you a static connection to the database.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many other ways of connecting to databases, but they all need extra work, and all are specific to particular databases or database interfaces. For example, you could implement Oracle's SQL.NET protocol yourself, rather thna using Oracle's thin drivers, or write code to parse the data structures in an Access MDB file. You would need to deal with threading issues and data integrity yourself, but it could theoretically be done.
When JDBC is so easily available, powerful, and implemented for such a wide range of databases there seems little reason other than personal interest to do any of this, though. If you are interested in this sort of thing, there is a book "Java Database Programming" by Brian Jepson, published by Wiley, which describes in detail the implementation of an SQL database which uses plain text files for data storage, and includes all the source code.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
However there are some draw backs to JDBC. Some might be speed. When you are connecting to a database the first thing to do is find out how many hit the page will have and about how many queries will be expected.
Sometimes java is better to use on a site that gets more hits then another.
Sometimes you can use other languages that will be faster. It is all relative to the site.
Many times I use PHP to interface with an Oracle database or Postgres database.
On the sites that use PHP, jdbc was slower.
RMI would be another option to look into.
Hope that answers some questions.

Ray
 
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic