vs2005 - How to fill form using TableAdapter FillBy

Discussion in 'ASP .Net' started by dbuchanan, Dec 13, 2005.

  1. dbuchanan

    dbuchanan Guest

    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
    dbuchanan, Dec 13, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dbuchanan
    Replies:
    3
    Views:
    1,592
    dbuchanan
    Dec 1, 2005
  2. dbuchanan
    Replies:
    0
    Views:
    430
    dbuchanan
    Dec 12, 2005
  3. =?Utf-8?B?UmljaGFyZA==?=

    Returning Output Parameters using a TableAdapter

    =?Utf-8?B?UmljaGFyZA==?=, May 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    3,081
    =?Utf-8?B?UmljaGFyZA==?=
    May 12, 2006
  4. Elmo Watson
    Replies:
    0
    Views:
    412
    Elmo Watson
    Jul 20, 2006
  5. Fendi Baba
    Replies:
    1
    Views:
    499
    Alvin Bruney [MVP]
    Feb 11, 2007
Loading...

Share This Page