XSD not updating MDF RRS feed

  • Question

  • I have made a mdf db using SQL 2005, and forms using VB.Net 2008. My problem is that at runtime the XSD seems to be updating quite nicely, however the mdf does not seem to be updating from the XSD. Using my own buttons I have tried to use the Tableadapter.update method (not sure if the code was correct), but this did not work. The fields are all bound to the binding source. I am not sure what I am missing here. Any help or advice would be appreciated.

    Sunday, February 17, 2008 12:37 AM

All replies

  • Hi,

    if this is still an issue for you please provide us with the repro code and we can help you take a look.

    Tuesday, April 7, 2009 10:16 PM
  • Are you trying to change XSD schema during runtime and then expect these changes reflected in a database schema? If this is the case then it is not supported by ADO.NET. When you call Update method of the DataAdapter/TableAdapter it ONLY updates data in a database not the structure. If you need to change structure, you would need to construct DDL statement (for example, CREATE TABLE...) that will be applied against your database and execute prepared DDL explicitly (for example, using ExecuteNonQuery method of the DbCommand object)
    Val Mazur (MVP)
    Wednesday, April 8, 2009 10:15 AM