PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms vs2005 - How to fill form using TableAdapter FillBy

Reply

vs2005 - How to fill form using TableAdapter FillBy

 
Thread Tools Rate Thread
Old 13-12-2005, 12:43 AM   #1
dbuchanan
Guest
 
Posts: n/a
Default vs2005 - How to fill form using TableAdapter FillBy


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

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off