MySQL Forums
Forum List  »  Other Migration

MySQL 4.0.17 and ByteFX .NET Provider Update Problem
Posted by: Brandon Schenz
Date: July 20, 2004 08:55AM

I am using ByteFX in a VB.NET application with MySQL 4.0.17.

I have a typed dataset that matches my database structure. When the app starts the DataSet is empty (because I do not want to load 40,000+ customer records). I load the DataSet based on plain text files received from my website. This all works fine.

I then go through the DataSet to see if the Customer record exists in the Database, and if so assign the proper CustomerID and call AcceptChanges. If not then I allow the row to be marked as new in the DataSet. Again, this all works fine.

The problem I am having is in the Sub to call the Update method of a DataAdapter. I get no errors, but the Database is not Updated. Below is my code:

Dim myconn As New MySqlConnection(myConnStr)
Dim myDbAdapter As New MySqlDataAdapter
Dim custCB as MySqlCommandBuilder

myDbAdapter.SelectCommand = new MySqlCommand("Select CustomerID, CompanyName, FirstName, LastName, Address, City, StateOrProvince, PostalCode, Country, Phone, Fax, Email, Notes, BillName, BillAddress, BillCity, BillState, BillZip, CellorPager, InternetCustomerNo from Customers", myconn)

custCB = New MySqlCommandBuilder(myDbAdapter)

myconn.Open()

myDbAdapter.Update(ds, "Customers")

myconn.Close()

I have looked at the commands generated by the CommandBuilder and they look correct, but after the code executes nothing was done in the database(no updates or inserts). I am looking for any ideas on why this may be happening.

I am looking forward to MySQL releasing this provider under their umbrella.

Brandon
Midwest Sports Supply

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL 4.0.17 and ByteFX .NET Provider Update Problem
5286
July 20, 2004 08:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.