Hello, i have build a WebService Application in Xojo which communicates with a database. The webservices seems to work fine but after some hours or usage i dont know, all querys to the database return error: Prepared statement needs to be reprepared. After some time all are good again.
Any ideas ?
In general, there is no advantage of keeping the PreparedStatement objects around for later use. Doing a new one every time doesn’t hurt and it eliminates your problem. It’s also not as slow as you’d think.
Some databases do not like to reuse PreparedStatements. You didn’t mention which database you were using but something to keep in mind.
[quote=146755:@Evdoxos Bekas]Hello, i have build a WebService Application in Xojo which communicates with a database. The webservices seems to work fine but after some hours or usage i dont know, all querys to the database return error: Prepared statement needs to be reprepared. After some time all are good again.
Any ideas ?[/quote]
i am using MySQL
The service unblocked about 10 hours later, but again after almost two weeks the MySQL database returns the same error : Prepared Statement Needs To be re- prepared. And after some hours works fine.
After all, the problem was that if the prepared statements used for a ‘view’ instead of ‘table’ then Error: Prepared statement needs to be reprepared.