How to update in Database....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Inbaraj
    New Member
    • Apr 2007
    • 76

    #1

    How to update in Database....

    Hi...

    In the Datagrid I am having 20 rows.... I want to update all the value in database.. Is there any way to update bulk insert ....

    with reg
    inbaraj
  • Paulson
    New Member
    • Apr 2007
    • 63

    #2
    Originally posted by Inbaraj
    Hi...

    In the Datagrid I am having 20 rows.... I want to update all the value in database.. Is there any way to update bulk insert ....

    with reg
    inbaraj

    Hi I'm Paulson

    yah you can do a bulk insert, but the code and db Query will be
    very heavy. You will have to send all the data you need as comma seperated string and probably I think you will also have to use an CURSOR(sql function).
    You can surely accomplish your task using this. But it will be tough if you have not done it before.

    Anyway if this odes any help pls inform me.

    bye PCP.

    Comment

    • Inbaraj
      New Member
      • Apr 2007
      • 76

      #3
      Originally posted by Paulson
      Hi I'm Paulson

      yah you can do a bulk insert, but the code and db Query will be
      very heavy. You will have to send all the data you need as comma seperated string and probably I think you will also have to use an CURSOR(sql function).
      You can surely accomplish your task using this. But it will be tough if you have not done it before.

      Anyway if this odes any help pls inform me.

      bye PCP.
      hi...

      Plz help me with sample codeing.....

      reg
      Inba

      Comment

      • TRScheel
        Recognized Expert Contributor
        • Apr 2007
        • 638

        #4
        Couldnt you just update one row, and throw that functionality into a for loop, just iterating through each row? Keep a static transaction, so if one fails, you can undo all the work (or not, up to you).

        Maybe I am not understanding why you need to have a bulk transfer.

        Comment

        • Inbaraj
          New Member
          • Apr 2007
          • 76

          #5
          Originally posted by TRScheel
          Couldnt you just update one row, and throw that functionality into a for loop, just iterating through each row? Keep a static transaction, so if one fails, you can undo all the work (or not, up to you).

          Maybe I am not understanding why you need to have a bulk transfer.

          Hi...

          In Datagrid i have some 50 records i want to insert all the records to the datbase.. For that only...

          Is it possible..... If yes plz help me with sample codeing...

          With reg
          inbaraj

          Comment

          • TRScheel
            Recognized Expert Contributor
            • Apr 2007
            • 638

            #6
            Originally posted by Inbaraj
            Hi...

            In Datagrid i have some 50 records i want to insert all the records to the datbase.. For that only...

            Is it possible..... If yes plz help me with sample codeing...

            With reg
            inbaraj

            Sure I could give you some sample code, can you please post:

            Language (c#, vb.net, ?)
            Datagrid HTML code
            The level of access you have to your SQL server (or table). I need to know if you can create, or have created, stored procedures, tables, etc for this.

            Comment

            • Inbaraj
              New Member
              • Apr 2007
              • 76

              #7
              Originally posted by TRScheel
              Sure I could give you some sample code, can you please post:

              Language (c#, vb.net, ?)
              Datagrid HTML code
              The level of access you have to your SQL server (or table). I need to know if you can create, or have created, stored procedures, tables, etc for this.
              hi...

              I am using C# windows application.... and the backend is Oracle... i am using sql commands not stored procedures....

              reg
              inba

              Comment

              • TRScheel
                Recognized Expert Contributor
                • Apr 2007
                • 638

                #8
                Originally posted by Inbaraj
                hi...

                I am using C# windows application.... and the backend is Oracle... i am using sql commands not stored procedures....

                reg
                inba
                I havent ever used Oracle, but there is a library available to converse with an Oracle backend through C#. On that note, I found this resource:

                Using Oracle In .NET

                I looked it over, and it seems fine. I saw a few problems with his strings, notably that he isnt using escape sequences nor declaring a string to ignore escape sequences with the @ symbol and not using string.Format. Read through that, create your own version of it, and post it (DO NOT POST ADDRESSES, USERNAMES, OR PASSWORDS) if you would like my input on it. If I had an Oracle testing server available here, I would throw up some sample code for you, but alas, anything I do here would be just speculation.

                Comment

                Working...