Which exception ? "Cannot open non-select statement"?
Problem is in fact that batch SQL statements parsing is not supported. So if you set SQL.Text to something like:
'declare @id int; select @id=f.ident_field from pokus1 f; select @id;'
(multiple SQL statements)
Then SQLParse does not describe this statement type as stSelect and when you try open such statement you will get above mentioned exception.
So ATM I do not know how to help you
... Only put your statements into stored procedure and use EXEC ...