Results 1 to 3 of 3

Thread: How to make commands work?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    How to make commands work?

    I have a scenario like this:


    "select ib1,ib2,ib3 from TABLE1 WHERE ib4= 'g' "

    I use the dataadapeter to fill a dataset with this data...


    Then I modify the data offline by editing the dataset


    The I want to update the database by using the dataadapter "Update" command

    For that to work I need to specify an updatecommand and an insert command.

    How do I do that? I haven't been able to find good info? I want to use stored procedures.


    help
    Henrik

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132
    Here are two quick samples for "Update ..." and "Insert Into ..." sql statements:

    Update Table1 Set Field1 = 'abc' Where Field2 = 123

    Insert Into Table1 (Field1, Field2) Values ('abc', 123)

    Note:
    if field type is char/varchar/text then value must be embraced in a single quotes and no quotes for numeric fields.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    Hi!

    Thanks for the reply, but I thik you misunderstood my question (perhaps I was unclear)
    I know sql, have been writing pl/sql for three years now.

    What was unclear to me was how I bind an update pl/sql prcedure to the dataadapter updatecommand. Which parameters that need to match if I perform

    da.Update(ds).

    /Henrik
    ps Forget what I wrote about the commandbuilder... it is not very effective when it comes to query performance ds

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