Remember though that Oracle and Access syntax is a little different. If most cases it doesn't matter, but sometimes it does. For instance, if you're working with dates it's a little different (if you're converting the date from a SQL date to a text date).
However, that said, here's some things to consider: 1) PreparedStatements seem to be faster for data access when you're talking to Oracle. I don't know why this is, but when I switched from Statements to PreparedStatements my speed went up. Also with PreparedStatements you don't have to worry about cleaning the input from users prior to putting it into the SQL (example you're looking for "'this'", the "'" is a reserved character). 2) If you're working with Oracle they have a XSQL Servlet in the XDK. It's faster for accessing the database than anything I've been able to write. However that Servlet won't talk to Access. This is also nice because you can setup one xsql file to get the data and several xsl files to format it for display. 3) If your web app is updating tables in Oracle you really ought to use stored procedures in the database. Access stored procedures and Oracle stored procedures aren't the same syntax wise. And they'll probably act differently as well. --mikej -=----- mike jackson [EMAIL PROTECTED] -----Original Message----- From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 2:13 PM To: 'Tomcat Users List' Subject: RE: JDBC-ODBC bridge error Thanks guys! This is what works: String sqlString = "SELECT str_card_fields FROM card_type WHERE str_card_type='"+cardType+"';"; Sandra Patricia Hunter Systems Development and Web Design -----Original Message----- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: April 1, 2003 2:06 PM To: Tomcat Users List Subject: RE: JDBC-ODBC bridge error it is just a typo, I think what you want is this String sqlString = "SELECT card_type.str_card_fields FROM card_type WHERE (((card_type.str_card_type='"+cardType+"'));"; cardType, is from you java and is a parameter Filip > -----Original Message----- > From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 01, 2003 1:54 PM > To: 'Tomcat Users List' > Subject: JDBC-ODBC bridge error > > > I am using the JDBC-ODBC bridge driver during development because I > don't want to load Oracle on my system here and am using Access for > now, and will be using Oracle in the final production. I know I know: > it isn't good but I > don't think it is the heart of the problem. > I don't know if that is the source of the problem but I am getting this > error message: > [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. > only on one page while the others using the same driver don't produce that > error. It may just be an SQL error. Here is the code snippet: > > String cardType = manageData.getCardType();%> > <P> cardType: <%=cardType%></p> //this is just a debug line and > produces the required value > <% > String sqlString = "SELECT card_type.str_card_fields FROM card_type > WHERE (((card_type.str_card_type=cardType));"; > > ResultSet rs = statement.executeQuery (sqlString); > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
