PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
vs2005 - How to fill form using TableAdapter FillBy
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
vs2005 - How to fill form using TableAdapter FillBy
![]() |
vs2005 - How to fill form using TableAdapter FillBy |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello,
I have added a query to my TableAdapter that accepts a parameter (The ID) to filter the data. It will return only one record. I tested it in the designer and it returns one record as expected. However I cannot get it to populate a form of databound controls. What could I be doing wrong? The controls were dragged onto the form surface which then made the dataset, tableAdapter and bindingSource in the forms component tray. Here is the code in the from_load event \\ Me.Table1TableAdapter1.FillBy(Me.DataSet11.table1, 2) // Here is the stored procedure \\ CREATE PROCEDURE dbo.usp_Table1_GetById ( @pkId int ) AS SET NOCOUNT ON; SELECT pkId, Name, Address FROM Table1 WHERE (pkId = @pkId) GO // (I *can* get a form with a datagridview to return the single record with the code above) What am I missing? Thank you, dbuchanan |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

