Re: MySQL - PreparedStatement problem
i am using MySql data base and java.
i was trying to execute this statement,
showing an error
public List getPersonalities(int intStart, int intResultsToReturn) throws DAOException
{
Connection conn;
PreparedStatement ps;
try{
ps = conn.prepareStatement("select * from PersonalityType LIMIT ?,? ");
ps.setInt(1, intStartIndex - 1);
ps.setInt(2, intNumberToReturn);
rs = ps.executeQuery();*/
}
}
unable to set values.
if i do like
ps = conn.prepareStatement("select * from Personality where active=1 LIMIT "+intStart+"," +intResultsToReturn);
can anybody solve this problem.
no error.
Subject
Written By
Posted
November 15, 2004 03:49AM
November 15, 2004 09:09AM
Re: MySQL - PreparedStatement problem
February 15, 2005 06:23AM
November 15, 2004 01:11PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.