ExecuteQueryHandler - Execute same query twice

Dec 19, 2012 at 5:47 PM

Hi,

in the class ExecuteQueryHandler  in PrepareDbCommand method

there is an if on _queryAlreadyExecuted.

i wanted to know why is that?

this prevents from changing the parameters from a created query and running it again.

(for example running an insert command multiple times with different parameters)

thanks,

gil

Dec 30, 2012 at 5:31 PM

Hi Gil, the reason for this is that FluentData disposes and cleans up the connection etc after the query has been executed. Also it was a simple prevention against supporting the feature you need since it would make the code more complex and require a change to many methods on the command object.

I've had some others request the same feature, so I will look into it after the vacation to see how much work it is to fix. But for now I suggest you create a method that creates a new command object every time you call it.

Regards,

Lars-Erik