.net - Convert a string to be readable as a linq object -
This is a school assignment that I have so much to keep flexible as possible as to the future I'm trying to mention it's back.
I'm trying to write to pass a string to a LINQ query a program uses a combobox.
private sub ComboBox1_SelectedIndexChanged (ByVal is not the System.Object, handles ComboBox1.SelectedIndexChanged ContractDataGridView.DataSource = as ByVal e System.EventArgs) some dim currValue Linq.Contract = As "aContract." & Amp; ComboBox1.Text 'error here is the value of' value 'string' link with real and returned value. Can not be converted into 'contract'. Database New myDatabaseDataContext to aContract.ContractAmt ContractDataGridView.DataSource = query End retarded aContract in Sub I know that brute force orders to = db.Contracts as dim query currValue. I would rather have to do something more flexible if possible.
If you are trying to use the string "a contract." & Amp; ComboBox1.Text 'to the command as the name of the column? If so, you are trying to create a dynamic link query is complex (and, I think that does not conform to try to level it) supports a whole library that works this way Check out for Try to try and explain a little bit of information you're trying to use that "aContract." & Amp; ComboBox1.Text 'to complete the value.
Comments
Post a Comment