On 5/2/02 2:26 AM, "Christian Haul" <[EMAIL PROTECTED]> wrote:
> On 01.May.2002 -- 09:54 PM, Zack Angelo wrote: >> Hey, >> >> I'm having some really peculiar behavior with the ESQL logicsheet. I >> have the following XSP (in my own logicsheet): >> >> <esql:query> select ID,count(ID) as count from Users where >> LoginUser='zack' and Password='password' group by ID</esql:query> >> >> The corresponding Java seems to be generating just fine: >> >> _esql_query = new EsqlQuery( _esql_connection, String.valueOf("select >> ID,count(ID) as count from Users where LoginUser='zack' and >> Password='password' group by ID") ); >> >> But, upon execution, I get this exception: >> >> org.apache.cocoon.ProcessingException: Exception in >> ServerPagesGenerator.generate(): java.lang.RuntimeException: Error >> executing statement: select ID,count(ID) as count from Users where >> LoginUser='zack' and Password='password' group by ID: >> java.sql.SQLException: Column not found: Unknown column 'LoginUser' in >> 'where clause' >> >> For some reason it's saying that one of the columns doesn't exist...I >> have no idea why. I've also copied and pasted the SQL query from the >> Java into the mysql client, and it works fine. Any ideas? This just >> seems really strange to me. Thanks in advance. > > It seems to be a problem with the mySQL jdbc driver. I believe we had > another user reporting similar problems with mySQL. I *think* a solution > was using only lower case coulmn names. According to the SQL standard, > case does not matter because everything is converted to uppercase internally, > except for strings within quotes. > > If the table belongs to another user / schema, you might need to qualify it > with the user name. > > Please check with a small java program that the driver is OK. > > HTH. > > Chris. Chris, Yeah, I've written entire applications with the mm mySQL driver before. I'm pretty certain it works. The lower-case solution also comes off a little strange because I've written a small XSP script (the one you helped me with before) and it worked great (also had capitalized column names). I also tried changing the user to root in the esql connection pool, still no good. Thanks for the input. - Zack --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>