User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 397,771 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,539 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 3008 | Replies: 4
Reply
Join Date: Oct 2004
Location: On Earth, I think...
Posts: 246
Reputation: mmiikkee12 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
mmiikkee12's Avatar
mmiikkee12 mmiikkee12 is offline Offline
Posting Whiz in Training

How do I access a PostgreSQL DB?

  #1  
Jul 9th, 2005
I just got a JSP hosting account and I'm wondering how I can connect to the PostgreSQL DB and execute queries. According to the host's FAQ, the database URL is:
jdbc:postgresql://localhost/username,username,password
.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2005
Posts: 9
Reputation: keibi is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
keibi keibi is offline Offline
Newbie Poster

Re: How do I access a PostgreSQL DB?

  #2  
Jul 10th, 2005
You don't access databases through JSP. JSP comes paired up with servlets written in Java. The servlets (and underlying classes) does all the heavy work, while the JSPs just view the results.
Reply With Quote  
Join Date: Oct 2004
Location: On Earth, I think...
Posts: 246
Reputation: mmiikkee12 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
mmiikkee12's Avatar
mmiikkee12 mmiikkee12 is offline Offline
Posting Whiz in Training

Re: How do I access a PostgreSQL DB?

  #3  
Jul 10th, 2005
You can't just do it with
<%
DB access code here
%>
?
Reply With Quote  
Join Date: Jun 2005
Posts: 9
Reputation: keibi is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
keibi keibi is offline Offline
Newbie Poster

Re: How do I access a PostgreSQL DB?

  #4  
Jul 10th, 2005
No idea, I never tried. I manage my database connections with Hibernate (persistence framework), and put only view code in the jsp's.
Reply With Quote  
Join Date: Oct 2004
Location: On Earth, I think...
Posts: 246
Reputation: mmiikkee12 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
mmiikkee12's Avatar
mmiikkee12 mmiikkee12 is offline Offline
Posting Whiz in Training

Re: How do I access a PostgreSQL DB?

  #5  
Jul 15th, 2005
Anyway, what's the Java code for accessing the DB?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 4:30 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC