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

Reply

Join Date: Mar 2007
Posts: 3
Reputation: Mizu is an unknown quantity at this point 
Solved Threads: 0
Mizu Mizu is offline Offline
Newbie Poster

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

 
0
  #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..
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,327
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 248
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

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

 
0
  #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 Quick reply to this message  
Join Date: Mar 2007
Posts: 3
Reputation: Mizu is an unknown quantity at this point 
Solved Threads: 0
Mizu Mizu is offline Offline
Newbie Poster

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

 
0
  #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 Quick reply to this message  
Join Date: Nov 2004
Posts: 6,144
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

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

 
0
  #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 Quick reply to this message  
Join Date: Feb 2006
Posts: 2,327
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 248
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

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

 
0
  #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 Quick reply to this message  
Join Date: Mar 2007
Posts: 3
Reputation: Mizu is an unknown quantity at this point 
Solved Threads: 0
Mizu Mizu is offline Offline
Newbie Poster

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

 
0
  #6
Mar 7th, 2007
Thanks jwenting and masijade. What both of you said is right, there will be only slight changes inthe code.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,144
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

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

 
0
  #7
Mar 7th, 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 Quick reply to this message  
Join Date: Feb 2006
Posts: 2,327
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 248
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

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

 
0
  #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 Quick reply to this message  
Join Date: Nov 2004
Posts: 6,144
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

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

 
0
  #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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC