Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

The schema returned by the new query differs from the base query

$
0
0
Whatever I try to do, I come up against this problem.

I have a main table which is linked to lookup tables in a relational structure (although not to 3NF). In the main table I changed the relevant TextBox to a ComboBox. I then dragged the related table icon in DataGridView to the ComboBox. In Data Binding Mode these are the details:

Data Source: l_object_typeBindingSource

Display Member: ObjectType

Value Member: OTID

Selected Value: t_mainBindingSource - OTID

I am then trying to add a query:

SELECT        [vl_v_lookup_list1-1].ID1, l_object_type.OTID, l_object_type.ObjectType, [vl_v_lookup_list1-1].F1ID, [vl_v_lookup_list1-1].F2ID, [vl_v_lookup_list1-1].IM1ID,
                         [vl_v_lookup_list1-1].IM2ID
FROM            l_object_type LEFT OUTER JOIN
                         [vl_v_lookup_list1-1] ON l_object_type.OTID = [vl_v_lookup_list1-1].OTID
ORDER BY l_object_type.ObjectType

but then I get the above error message. I tried to change the 'Select data source table' but no luck.

In my MS Access setup the front end is:

Control Source: OTID (in the main table)
Row Source: SQL as above
I also have an After Update event in VBA which will need to be 'translated' into C#:

Private Sub OTID_AfterUpdate()
Me.F1ID = Me.OTID.Column(3)
Me.F2ID = Me.OTID.Column(4)
Me.IM1ID = Me.OTID.Column(5)
Me.IM2ID = Me.OTID.Column(6)
End Sub

Any ideas?

Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>