Error when using prepare with multiple statements
Posted by: Alejandro Panizza
Date: November 27, 2006 08:20AM

I' m using MySqlConnector 5.0 and cannot make two open select statements work

The code goes something like this


MySqlCommand cmd1 = new MySqlCommand("SELECT ....",connection);
cmd1.Prepare();
MySqlDataReader r1 = cmd1.ExecuteReader();
r1.Read();
.....
MySqlCommand cmd2 = new MySqlCommand("SELECT ... ",connection);
cmd2.Prepare();
MySqlDataReader r2 = cmd2.ExecuteReader();
r2.Read();


The second prepare throws an error "expected statement parameter marker", even if the second select has no parameteres .

Any help would be appreciated..
Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Error when using prepare with multiple statements
November 27, 2006 08:20AM


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.