HELP! I'm a newbie.. :) MySQL Connector Problem (.NET)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi:

I am new to both .NET and MySQL (yes, I know.. cringe) and am trying to
build a web application using vb .NET to access data in a MySQL database
using the MySQL connector for .NET.

I am using a dataAdapter (mySQLDataAdapter) and am filling it with a dataset
which was derived from a select statement.

the data reading part (getting data from the database, through my adapter
and to the dataseet) is working just fine, I am able to bind the dataset to a
datagrid and view the table contents just fine.

However, I have not been able to get the dataAdapter to update, insert, or
delete records in the database. I've tried just about every approach from
using the dbcommandbuilder to manually programming the statements and NOTHING
is working.

Does anyone have any ideas as to how I could proceed? I've tried looking at
my database rights to ensure there is no problem there. I am not getting any
concurrency issues and the adapter is not throwing any errors.. It just isn't
writing anything to the database...

thanks!
 
Are you using an explicit Update command or a CommandBuilder? I was using
the ByteFX and could never get it to work with the commandBuilder (not
implying it's ByteFx's problem - I can be quite the bubblehead at times).
Also, have you verifed that your changes are 'taking' is
Debug.Assert(dataSetName.HasChanges());? or similar method to make sure that
the dataset is seeing the changes? Finally, if you could post the update
command and the call to .Update, that would help.
 
John,
You may have already found a fix - I just became a memeber.
It has been my experience that the tables you need to update on require a
primary key in order to work. I hope that helps.

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top