I get errors like that with coldfusion pages connecting to access if the variable type does not match the database field or if the value is null.
if the database field is a string you I need to use single quotes around the value in the sql statement String sqlString = "SELECT card_type.str_card_fields FROM card_type WHERE (((card_type.str_card_type='cardType'));"; Also, how are you getting the value of cardtype into the select string if everything is within the double quotes? what about String sqlString = "SELECT card_type.str_card_fields FROM card_type WHERE (((card_type.str_card_type='"+cardType+"'));"; -----Original Message----- From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2003 2: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]
