This project is read-only.

Quick Question Regarding Input.Command

Jun 11, 2015 at 7:56 PM
I've been wondering for some time if there was a way using the

Input.Command syntax to instantiate the row parameter on the Prepare delegate.

So for instance:

Input.Command(ConnectionId, string.Empty, IsQuery, FailOnError, PrepareMethod).Execute(false);

Where the PrepareMethod param is defined as:

protected static void PrepareMethod(IDbCommand cmd, Row row)
        cmd.CommandText = "EXEC spAStoredProcedure @IdParam; "
        cmd.CommandTimeout = 240;

        cmd.AddParameter("IdParam", row["Id"]);
I can never figure out how to pass the "row" param in when using "Command"....dumb I know. The reason I would love to do this is that I want to execute SQL BUT I always want to use stored procs and parameters rather than passing in SQL in the form of a string.

Thanks. I use this library all the time. I hope you continue to work and refine it. It has been a huge boon to my work. I can't tell you how much this library has saved me in time and money.


Mark Gillen