locked
saving and retrieving richtext in a sql server db RRS feed

  • Question

  • I'm developing an application which uses a SQL server db. I want the end user to be able to write some text in a field, format it, then retrieve it formatted.

    But I a problem. When I debug the application and insert some text and format it, I can't save it. When I click "save" , I have this error message: " update requires a proper update command when passed modified rows."

    Please help me solve this problem. What's the proper update command I need in this case?

    thanks
    Friday, July 20, 2007 12:12 PM

Answers

  • Hi,

     

     Would you clarify how do you save your richtext to database? Based on your post, I assume you use DataAdapter class to save data to database. When you call the Update method, the DataAdapter analyzes the changes that have been made and executes the appropriate command (INSERT, UPDATE, or DELETE). When the DataAdapter encounters a change to a DataRow, it uses the InsertCommand, UpdateCommand, or DeleteCommand to process the change.  You must explicitly set the proper commands which handles your data before calling Update. For more information about how to set commands for Update, visit:

            http://msdn2.microsoft.com/en-us/library/33y2221y(VS.80).aspx

     

    If you have further question, please feel free to let me know. 

     

     

    Thanks for your question

    Monday, July 23, 2007 9:07 AM
    Moderator

All replies

  • help me, please.
    Saturday, July 21, 2007 12:27 PM
  • Hi,

     

     Would you clarify how do you save your richtext to database? Based on your post, I assume you use DataAdapter class to save data to database. When you call the Update method, the DataAdapter analyzes the changes that have been made and executes the appropriate command (INSERT, UPDATE, or DELETE). When the DataAdapter encounters a change to a DataRow, it uses the InsertCommand, UpdateCommand, or DeleteCommand to process the change.  You must explicitly set the proper commands which handles your data before calling Update. For more information about how to set commands for Update, visit:

            http://msdn2.microsoft.com/en-us/library/33y2221y(VS.80).aspx

     

    If you have further question, please feel free to let me know. 

     

     

    Thanks for your question

    Monday, July 23, 2007 9:07 AM
    Moderator