MySqlCommandBuilder SqlCommandBuilder Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raulbolanos
    New Member
    • Apr 2009
    • 31

    MySqlCommandBuilder SqlCommandBuilder Error

    Hi Pr0's,

    I have a problem trying to implement the same example from this link:

    http://msdn.microsoft. com/en-us/library/system.data.sql client.sqlcomma ndbuilder.aspx

    But instead of Sql I use MySql. When I fill the DataSet with the data from the DB I dont have any trouble I can even fill also a DataGridViewer and display the data in my form.

    The problem is when I want to use the GetUpdateComman d. I get an exception error like "Dynamic SQL generation is not supported against multiple base tables".

    So basically I get the Data from the DB and then fill the DataSet and then copy it to the DataGridView. Afterwards I modify manually the rows and then I want to update it.

    Why do you think I have this problem? I just copied the code exactly from the MSDN's example and I get this error.

    Thank you in advance,
    Raul Bolanos.
  • raulbolanos
    New Member
    • Apr 2009
    • 31

    #2
    My Query is something like this
    Code:
    string queryString = "SELECT xValue, yValue, specType, s.specIndex FROM (verspec s INNER JOIN verspecdata sd on s.specIndex = sd.specIndex) WHERE (productNumber = 'TEST') AND options = '000 000 000' AND specType = 0 AND curveIndex = 0 ORDER BY productNumber";

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      The message tells you it all. You cannot auto generate an update command if you are selecting from more then one table.
      You will need to create your own update SQL command manually.

      Comment

      Working...