コード例 #1
0
            private static OleDbCommand GetCommand(VfpDataReader vfpDataReader)
            {
                if (vfpDataReader == null)
                {
                    return(null);
                }

                var oleDbDataReader = vfpDataReader._dbDataReader as OleDbDataReader;

                if (oleDbDataReader == null)
                {
                    return(null);
                }

                var propertyInfo = typeof(OleDbDataReader).GetProperty("Command", BindingFlags.NonPublic | BindingFlags.GetProperty | BindingFlags.Instance);

                return((OleDbCommand)propertyInfo.GetValue(oleDbDataReader, null));
            }
コード例 #2
0
 public SchemaFixer(VfpDataReader vfpDataReader)
 {
     _command = GetCommand(vfpDataReader);
 }