I suspect the smiley is in reference to "standard" SQL. I realize that it is
pretty much an oxymoron but there are several things you can do to keep as
much compatibility as possible.
First, create a mechanism that allows you to choose between SQL strings at
run-time. We check for the database in use via JDBC and use a hashtable
lookup of the SQL strings to choose between MS-SQL and Oracle. This is
mostly for differences in JOIN syntax/semantics but there are a few other
problems as well.
Second, make sure all of your table names and column names are less that 18
characters. DB2 still has an 18 character limit on column names. Since
constraints are usually created through the DBA tools and not JDBC, we
didn't worry about any limit on constraint names.
Third, don't use stored procedures. Only access the database through JDBC
statements.
Fourth, don't use JDBC timestamps as primary keys.
We pretty much limit ourselves to SELECT, INSERT, UPDATE, DELETE statements.
We support both MS-SQL and Oracle at run time and have done limited testing
with IBM DB2.
-----Original Message-----
From: Scott Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 01, 2000 10:55 AM
To: [EMAIL PROTECTED]
Subject: OFFTOPIC "Standard SQL" -- WAS: "RE: jsp and NT"
Jim Bailey wrote:
"Make sure that you use as much standard SQL as possible and not Oracle's
PL-SQL unless you want to be tied to Oracle."
Does anyone know an Internet resource that really details the syntax of
standard SQL, preferably with a JDBC focus and in human readable format. :-)
Thanks,
Scott Evans
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets