/ Published in: C#
AccessHelperUtility.cs
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
using System; using System.Data.OleDb; using System.Collections.Generic; using System.Text; namespace Web.DataAccess { public sealed class AccessHelperUtility { private AccessHelperUtility() { } public static Dictionary<string, OleDbParameter> OleDbParameterArrayToGDictionary(params OleDbParameter[] paras) { foreach (OleDbParameter p in paras) retval.Add(p.ParameterName, p); return retval; } public static List<OleDbParameter> OleDbParameterGDictionaryToGList(Dictionary<string, OleDbParameter> paras) { foreach (string k in paras.Keys) retval.Add(paras[k]); return retval; } public static OleDbParameter[] OleDbParameterGDictionaryToArray(Dictionary<string, OleDbParameter> paras) { foreach (string k in paras.Keys) retval.Add(paras[k]); return retval.ToArray(); } } }