Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > vs2005 - How to fill form using TableAdapter FillBy

Thread Tools

vs2005 - How to fill form using TableAdapter FillBy

Posts: n/a

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
SELECT pkId, Name, Address
FROM Table1
WHERE (pkId = @pkId)

(I *can* get a form with a datagridview to return the single record
with the code above)

What am I missing?

Thank you,

Reply With Quote

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ObjectDatasource cannot find a non generic update method when using TableAdapter and deploying using WebSetUp Project rote ASP .Net 0 08-01-2008 07:24 AM
TableAdapter: How do I create one which inserts values from a form into two tables? Fendi Baba ASP .Net 1 02-11-2007 02:35 PM
Returning Output Parameters using a TableAdapter =?Utf-8?B?UmljaGFyZA==?= ASP .Net 1 05-12-2006 06:54 PM
VS2005 - Newbie - TableAdapter not configured, but it updates!! dbuchanan ASP .Net 0 12-12-2005 10:41 PM
VS2005 - How to connect to a TableAdapter in the data layer dbuchanan ASP .Net 3 12-01-2005 01:28 PM