mySQL and DataSet INSERT Has Anyone Succesfull?

Discussion in 'Databases' started by manabu, Dec 2, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am experimenting DataSet and mySQL. Mostly it is working but the following code (for example) does not update the mySQL table.

    DataRow myDataRow;
    myDataRow = myDataSet.Tables["Acc"].NewRow();
    myDataRow["AccTime"] = DateTime.Now;
    myDataRow["User"] = "Tim";
    myDataRow["E-mail"] = "[email protected]";
    odDA.Update(myDataSet.Tables["Acc"]);

    If I was to replace
    myDataRow = myDataSet.Tables["Acc"].NewRow();
    with
    myDataRow = myDataSet.Tables["Acc"].Rows[0];

    It works. So long as the row already exists in mySQL table, the update does occur. It looks like the INSERT is something that it does not work. If you have any clue, I would love to know.




    Manabu Tokunaga , Half Moon Bay, California
    +1 415.309.45?9 [email protected]
    [email protected]
    Visit: http://www.culturewave.net/surfing
     
  2. Always have trouble with this, seems ODBC falls short of the required funtionality, as the same thing works with ASP.NET SQL Objects

    I've worked around by generating the SQL statments on-the-fly and calling with and ODBCCommand, but would be good to see if anyone has had this working
     
  3. I have resorted to that same for now as well.

    Previous to that, and after posting the message, I have also tried to manually create an Insert command into the CommandBuilder. That did not do anything either... Still investigating...


    Manabu Tokunaga , Half Moon Bay, California
    +1 415.309.45?9 [email protected]
    [email protected]
    Visit: http://www.culturewave.net/surfing
     
  4. Please post it here if you do, i'll do the same

    such a shame the mySQL, in all it's uberness, doens't have this. could be a droiver issue and the cynic in me see's Bill Gates not wanting to fully support it
     
  5. There is an installation of MyOLEDB at www.mysql.com but I don't think it's supported ATM by DASP

    And, from the .NET help, it looks as though SqlCommandBuilder or OleDbCommandBuilder will genrate INSERT, UPDATE and DELETE statements on the fly, as long you specify at least the SELECT statement.

    sounds good but i'd like to see it in practise. I'll install it at home and see if it works okay
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    Try some .net native provider.

    See this kb article, http://kb.discountasp.net/article.aspx?id=10081

    quote:Originally posted by Timbo

    There is an installation of MyOLEDB at www.mysql.com but I don't think it's supported ATM by DASP

    And, from the .NET help, it looks as though SqlCommandBuilder or OleDbCommandBuilder will genrate INSERT, UPDATE and DELETE statements on the fly, as long you specify at least the SELECT statement.

    sounds good but i'd like to see it in practise. I'll install it at home and see if it works okay
    </blockquote id="quote"></font id="quote">
     
  7. Would DASP be willing to consider installing MyOLEDB on their servers? MySQL fully support it, it allows use of the OleDbCommand object offered by the standard .NET package and can be used in conjunction with the currect ODBC DSN's that have been set up to access our databases currently

    These assemblies are all okay, but I'm always put off by the bug list. But then, maybe it's MicroSoft that's weird, being that don't make their bugs that public, i dunno
     
  8. Bruce

    Bruce DiscountASP.NET Staff

    We do not intend to do much on mySQL in the foreseable future.

    To be honest, we think people should us MS SQL for their webapp rather than MySQL. MS SQL is a much better database server in my opinion.

    quote:Originally posted by Timbo

    Would DASP be willing to consider installing MyOLEDB on their servers? MySQL fully support it, it allows use of the OleDbCommand object offered by the standard .NET package and can be used in conjunction with the currect ODBC DSN's that have been set up to access our databases currently

    These assemblies are all okay, but I'm always put off by the bug list. But then, maybe it's MicroSoft that's weird, being that don't make their bugs that public, i dunno
    </blockquote id="quote"></font id="quote">
     
  9. Most Definitely Bruce. All plans I've set up since my mySQL-based one use MS SQL, purely for the enhanced functionality of the SqlCommand objects in .NET

    but a lot of people still love mySQL. it's a nice app and, above all, it's half the price of MS SQL (on your hosting plans) for no discernable loss of performance. Free installs of the server are also attractive.

    Would be nice to get it working, but it sounds like you're going to discontinue mySQL, so probably not viable to install. oh well :¬(
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page