Skip to main content

Timeline for ADO.NET Wrapper

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Sep 27, 2016 at 15:10 vote accept Jeff
Sep 27, 2016 at 15:10 comment added Jeff That's similar to how i currently do it, so that works for me. Thanks for the input!
Sep 27, 2016 at 14:20 comment added t3chb0t @Jeff I've added another example. You just need to add the {} to be able to write more statements. It's a little bit inconvenient due to the interface but if you know that you are always be using the sql provider then you might switch to the specific type and add parameters like in your comment above.
Sep 27, 2016 at 14:18 history edited t3chb0t CC BY-SA 3.0
added 266 characters in body
Sep 27, 2016 at 13:45 comment added Jeff Good catch on the shared connection variable. One question with your approach of the command, how can I pass parameters to it? Normally I would do cmd.Parameters.Add("@p1", SqlDbType.VarChar).Value = "abc"; but using this way I can only do this Execute(c => c.Parameters.Add("@p1")); That was one of the reasons why I was passing in the command object. I just don't know of a better way.
Sep 27, 2016 at 9:55 history edited t3chb0t CC BY-SA 3.0
deleted 8 characters in body
Sep 27, 2016 at 9:50 history answered t3chb0t CC BY-SA 3.0