Format:
Recent snippets matching tags of DbDataReader
/// <summary> /// Creates a list of a given type from all the rows in a DataReader. /// /// Note this method uses Reflection so this isn't a high performance /// operation, but it can be useful for generic data reader to entity /// conversions on the fly and with anonymous types. /// </summary> /// <typeparam name="TType"></typeparam> /// <param name="reader">An open DataReader that's in position to read</param> /// <param name="fieldsToSkip">Optional - comma delimited list of fields that you don't want to update</param>
825 Views
no comments
using(OleDbConnection connection = new OleDbConnection(ConnectionString)) { using(OleDbCommand cmd = new OleDbCommand(sql, connection) { CommandType = CommandType.Text }) { try { connection.Open(); } catch (OleDbException ex) {
187 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
