Results 1 to 2 of 2

Thread: [RESOLVED] [2005] Filling a typed dataset

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    Resolved [RESOLVED] [2005] Filling a typed dataset

    Hello,

    I have a typed dataset.

    I am trying to fill the typed dataset from a datset that is returned from a web service.

    Code:
    Me.DsOrders.customers = ws.getCustomers()
    However, the error message I get is: "customer table is read-only"

    Is there any way you can fill a typed dataset table like this. This works fine with a untyped dataset. However, I have already done this project using typed and too late to change now.

    Many thanks for an suggestions.

    Steve
    Last edited by steve_rm; Oct 5th, 2007 at 03:18 AM.
    steve

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Filling a typed dataset

    You don't assign anything to a table in a typed DataSet. The table already exists so you either populate it:
    vb.net Code:
    1. myTableAdapter.Fill(myDataSet.SomeTable)
    or you get a loose DataTable and don't use a DataSet at all:
    vb.net Code:
    1. Dim table As SomeDataTable = myTableAdapter.GetData()
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width