Results 1 to 4 of 4

Thread: Data adapter objects

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    Data adapter objects

    I'm using data adapters and datasets from the toolbox, rather than code for this project.
    If I want the automatic Insert, Update & Delete statements, I can only put one table in the data adapter. I can add plenty to a single dataset, though. To get these statements, do I have to add a data adapter for each table, but can use just one dataset? There's probably ten tables. Thanks.

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    I did not realise you could only update one table through the dataadapter from the toolbox. If this is so, you can construct your own custom UpdateCommand using normal SQL statements and then assign it to the UpdateCommand property of the DataAdapter.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Thanks taxes. The reason you can't update more than one table is that the data adapter generates the commands from the SELECT statement used in the data adapter. When there's more than one table in the statement, it doesn't know how to build the other commands. Maybe VS 2003 can do it, but not 2002.
    I suppose I could build statements manually, but that sort of takes away a reason to use the toolbox data tools in the first place.

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Hi,

    "I suppose I could build statements manually, but that sort of takes away a reason to use the toolbox data tools in the first place."

    Yes. Things like this do tend to move away from the "Visual" part of VB.NET. I thought the original idea if Visual programming languages was to move away from writing code
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

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