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 427,314 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,846 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: 1841 | Replies: 8
Reply
Join Date: Mar 2007
Posts: 3
Reputation: Mizu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Mizu Mizu is offline Offline
Newbie Poster

Question Will the jsp code will change if we connected to the oracle database ?

  #1  
Mar 6th, 2007
Hi all

hehe sorry .. lol 1st of all iam new here ... and i really liked this site its very informative .. and iam sure i will enjoy being a member here..

before when we do a site we choose the database access but this time it will be connected to the oracle database(sql+) , my question is will the jsp code change ? ... and plz if u may write some examples i will be thankful


tc..
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Posts: 1,460
Reputation: masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice 
Rep Power: 9
Solved Threads: 131
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: Will the jsp code will change if we connected to the oracle database ?

  #2  
Mar 6th, 2007
Of course there will be some changes, but they should be minor. Except that, from other examples I've seen, most of your SQL statements will need to be rewritten.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Mar 2007
Posts: 3
Reputation: Mizu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Mizu Mizu is offline Offline
Newbie Poster

Re: Will the jsp code will change if we connected to the oracle database ?

  #3  
Mar 6th, 2007
Thanks masijade .. for replying back ..

well i guess we need to do it the old way .. because we dont have time to review all things again ...
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 199
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Will the jsp code will change if we connected to the oracle database ?

  #4  
Mar 6th, 2007
if done properly, your JSPs won't have anything to do with the database so they won't change.
Your servlets won't have much to do with the database so they most likely won't change either.
Only your ORM mapping files and configuration files would change to take the different database configuration into account.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Join Date: Feb 2006
Posts: 1,460
Reputation: masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice 
Rep Power: 9
Solved Threads: 131
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: Will the jsp code will change if we connected to the oracle database ?

  #5  
Mar 6th, 2007
Originally Posted by jwenting View Post
if done properly, your JSPs won't have anything to do with the database so they won't change.
Your servlets won't have much to do with the database so they most likely won't change either.
Only your ORM mapping files and configuration files would change to take the different database configuration into account.



But you know very well, that all of the above is, in this case, not true. ;-)

But actually if they are going from Acess to Oracle (which is what I read from the original post), then where ever it is that they have their SQL, those statements will change because of all this "[fieldname]" stuff (At least that is what I have seen from every example/problem where Acess is asked about. Whether that is how it is done or not, I don't know, I don't use Access).

But, as you said, that should not be in the JSP at all, and only sparingly, at most, in the Servlets. Some Custom Tags, and other context items, could be be in for some major changes though (SQL wise as I said).
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Mar 2007
Posts: 3
Reputation: Mizu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Mizu Mizu is offline Offline
Newbie Poster

Re: Will the jsp code will change if we connected to the oracle database ?

  #6  
Mar 6th, 2007
Thanks jwenting and masijade. What both of you said is right, there will be only slight changes inthe code.
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 199
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Will the jsp code will change if we connected to the oracle database ?

  #7  
Mar 6th, 2007
there should be no custom tags relying on SQL statements at all...
And I seriously doubt someone learning the ropes has a need for any server specific SQL extensions, they should stick to standard SQL92 which is just about fully portable.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Join Date: Feb 2006
Posts: 1,460
Reputation: masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice 
Rep Power: 9
Solved Threads: 131
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: Will the jsp code will change if we connected to the oracle database ?

  #8  
Mar 7th, 2007
Sorry, jwenting, I was thinking of beans and wrote tags, but that is beside the point.

What I was getting at, is they mentioned using Access for their database before, and from what I have gleaned (I could be completely wrong on this, but it doesn't appear so) Access allows spaces in Field/Column names as long as you then enclose that name in brackets "[ ]" in the SQL statements (and there appear to be other reasons as to why people may want enclose them, as well). This (correct me if I am wrong), AFAIK, is not allowed in standard SQL, but (at least it seems so) nearly everyone that uses Access does this, and so, to make it uniform, often then enclose all field names in brackets. This will definately need to change.

We both know they should stick to SQL92 (and I do so as long as it is possible), but most of the time they do not know what that is, and do not look it up. They have the database they use in front of them, and see that they are allowed (in that database) to do "so and so", and so they do "so and so".

That might not be the case here, and I will truely applaud them if that is so, but I seriously doubt it.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 199
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Will the jsp code will change if we connected to the oracle database ?

  #9  
Mar 7th, 2007
SQL indeed doesn't allow spaces.
The fact that Access does allow them doesn't mean you should use them...

I've used Access, yet never used spaces in table or column names (maybe because I learned SQL before starting to use Access).

If that database has some non-standard features in it, it's past time for some dataconversion to make it better
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Reply

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

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

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

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