Newbie need little help with VS2005 + Connector NET + VS plugin
Posted by: Radoslaw Caplap
Date: December 12, 2006 03:45AM

Hello
I'm new with MySql and i have little problem.
I'v created dataset with all comands (select, insert, delete, update) and can get data from database via table adapter without trouble. But how can I f.e insert a new row into database?. In MsSQL (i previously used that) after making changes with table adapter i'v call mytableadapter.Update() and thats was all. With MySql that method not work.

Code looks like this:
//WAPRO database connection - MsSQL
this.WAPRO_kontrahentTableAdapter1.FillBy_Web_Allowed_User(waprO_DEMODataSet1.WAPRO_KONTRAHENT_Table ,"%TAK%");

waprO_DEMODataSet1.WAPRO_KONTRAHENT_Table.AddWAPRO_KONTRAHENT_TableRow(4,"TAK" ,"newuser", "newpass");

WAPRO_kontrahentTableAdapter1.Update(waprO_DEMODataSet1.WAPRO_KONTRAHENT_Table);
//now new row appears in database

//trying same with MySQL database
this.OKOK_kontrahenT_TableAdapter1.Fill(okokDataSet1.KONTRAHENT_OKOK_Table);
okokDataSet1.KONTRAHENT_OKOK_Table.AddKONTRAHENT_OKOK_TableRow(new_row);
//new_row previously created and filled with data outside this part of code
//now call update medthod - apperas after i'v filled dataset with update,insert //and delete commands
OKOK_kontrahenT_TableAdapter1.Update(okokDataSet1.KONTRAHENT_OKOK_Table);
//no errors was returned but data table stays without any change

Thanks in advance for any help

EDIT:
After i'v tried to modify existing row in the table i'v got error message :
Only byte arrays and strings can be serialized by MySqlBinary
any ideas how to resolve this?



Edited 1 time(s). Last edit at 12/12/2006 05:41AM by Radoslaw Caplap.

Options: ReplyQuote


Subject
Written By
Posted
Newbie need little help with VS2005 + Connector NET + VS plugin
December 12, 2006 03:45AM


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.