Any answers ?

On Nov 26, 12:13 pm, jalchr <[email protected]> wrote:
> This is interesting
> I have a row with 3 values:
> row["Id"] = Guid.NewGuid();
> row["invalidSqlDateTime"] = DateTime.Parse("1500-01-01");
> row["CreatedDate"] = DateTime.Now;
>
> my insert statement is this:
> Insert Into TableName (Id, CreatedDate) Values (@Id, @CreatedDate);
>
> When etl builds the parameters list, it graps everything in the row
> fields including those not targeted by the insert statement. This
> actually throws an error when executing the command.
>
> First I assumed that only the fields targeted by the insert statement
> will be used as parameters (The extra processing is unnecessary). I
> had to dig into source code to really know what is happening, even
> used sql profile which didn't receive the sql stmt.
>
> And then the whole parameters are sent to ado.net which seems to check
> for sql datatime ranges and blows up.
>
> Best solution is to build parameters only for those targeted fields
> which becomes easy to debug and solve.

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to