binding a scalar table adaptor to a control in vb.net - TechRepublic
Question
March 10, 2009 at 07:49 AM
gordon.hope-murray

binding a scalar table adaptor to a control in vb.net

by gordon.hope-murray . Updated 17 years, 4 months ago

I’m trying to create a simple form which displays a combo box with data from a table tasks, I want to display only those tasks that are valid for entries in the Users_tasks table determined by the foreign key UserID from the users table.

I can’t add a query to my existing table adaptors because the schema is different, so I added a query in the dataset designer to the query table adaptor.

I now have a scalar table adaptor , and call the query function and pass it the user id, but am unable to bind it to a control on my form.

Dim scalarQueriesTableAdapter As InsightAdminDataSetTableAdapters.QueriesTableAdapter

scalarQueriesTableAdapter = New InsightAdminDataSetTableAdapters.QueriesTableAdapter

scalarQueriesTableAdapter.SelectUserTasks(CurrentUserID)

when executing the query it returns the right data.

i tried adding the querytable adaptor as a datasource, but it doesn’t show any of the fields, and the scalattable adaptor doesn’t appear at all.

This discussion is locked

All Comments