OK so how do you generate an EntityField for a field in a view when you have the viewname and fieldname as strings (from GUI comboboxes); so you can use it in code to generate a dynamic list.
ResultsetFields fields = new ResultsetFields(1);
fields.DefineField(????,0);
It took me a half an hour to do all this in straight SQL with code like
DataTable views = con.GetSchema(SqlClientMetaDataCollectionNames.Views);
and
SqlCommand cmd = new SqlCommand("select * from " + Viewname, con);
SqlDataReader r = cmd.ExecuteReader(CommandBehavior.SchemaOnly);
but the generated code has so much baggage, I get lost, casts here there and everywhere
It's been a hard day