.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

[C#] MySQL -> XML

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :Windows Application

Hey. I would like to know how to import data from MySQL database into XML file...

I made WindowsFormApplication with button - I click it, it making a some query from database xxx, table xxx and what's next? How to convert and save into XML ???

I'm reading about XMLSerializer... but I'm newbie and I don't know how to bite it...

Can someone explane me it???

I'm newbie, so don't shout :P


View Complete Post

More Related Resource Links

Individual field - MySQL



I was wondering how to recieve an individual field from my MySQL database.

I have been able to get a row, but what I am trying to do is get a name from my database and set it into the HeaderText in my DataGrid.

The way I am trying to do it at the moment is

using (OdbcCommand cmd = new OdbcCommand(formQuery, con))
                formDataGrid.Columns[0].HeaderText = cmd.ExecuteReader(
                    CommandBehavior.CloseConnection |

This doesn't seem to get a value from the GetValue, but if use

using (OdbcCommand cmd = new OdbcCommand(formQuery, con))
                formDataGrid.DataSource = cmd.ExecuteReader(
                    CommandBehavior.CloseConnection |

it will bind my data into the grid.

I just want to be able to change the HeaderText in the first coulmn of the DataGrid from one table and have the DataGrid be filled from another table.

I can fill the DataGrid its just changing the HeaderText that I am having trouble with.

Any help?

search in mysql database, mvc



I have set up a mysql connection in visual studio 2010 and now i have a connection and dont really know where to go next.

I want to be able to search the data and get the result in a view.

using asp.net mvc

Using LINQ and MySQL


Hi. I am wondering if its possible to use LINQ and MySQL?

I am build as .NET MVC, i have set up my MySQL connection and want to retrive the data and display it in a view, how is this done?

Can i use LINQ or something else or should dont use it at all.

// Thanks

Saving textbox data to MySql database in asp.net


Hi dear coders

though a very simple question to ask, but please tell me how to save and retrieve data in/from my textboxes to/from database (MYSQL) on submit button click.

i know its a very simple task but i cant make it done, so i request you to please send me some working example link or post any helpful code here in asp.net

i will be highly thankful for any kind help from you geniuses.



MySql.Data assembly problem



I added refernece MySql.Data to my project. My web.config looks like that:

<?xml version="1.0"?>
                <add assembly="MySql.Data, Version=, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>

But when in ServerExplorer I try "Add Connection..." I can't find "MySql Database" in the "Choose Data Source" dialog box?

What the problem can be?

get the last inserted row ( autoincrement id ) in mysql database back


In my mysql I have an autoincrement id , whenever I add a new row into database I need to store this id in other table, so how to get this autoincrement Id back?

convert mysql to mssql


HI All,

I am looking for the ms sql syntax for this

mysql> UPDATE Books, Orders
    -> SET Orders.Quantity=Orders.Quantity+2,
    ->    Books.InStock=Books.InStock-2
    -> WHERE Books.BookID=Orders.BookID
    ->    AND Orders.OrderID = 1002;


mysql and vb.net connection


Dear All,

May I ask the following questions?

1.  How can I connect mysql to vb.net and showing it for example on a gridview?

2.  How can I use membership roles and username then linking it on my database?  Ex.  If i have employees table it should have link the username and password on the aspdbnet table?  Thanks. 

Import contacts on Mysql

Hello,   I am in the process of transferring data and contacts onto a Mysql database. I have had some help and am trying to get a software solution.   So main features would be to migrate large amounts of data and contacts every day. The migration would be done manually.  Thanks for the help.

Connection Problem with mysql and asp.net

i'm using this string to connect with mysql and asp.net but still agot the connection problem. the connection is not going to open............. i got the following error....... ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified please help me come from this problem "DRIVER={MySQL ODBC 3.51 Driver};DSN=sql4;SERVER=;DATABASE=myppw; UID=kraft; PASSWORD=myka; OPTION=3"

MySQL to SQL Server Conversion Tools

Anyone know of any FREE database conversion tools?

mysql data source provider - mysql connector/net

Dear All, I having problem installing mysql connector/net 6.2.3 on my vsd 2010 because the installed went smoothly but when Im trying to use the mysql on data source provider, I cant see it on the list and when try to install/change the connector the visual studio integreation has an x mark meaning to say it was not installed on my vsd2010.  Thanks.

Webmatrix with mySql

Is there any good instruction on how to make Webmatrix work with mySql. Regarsd,

Mysql connector and medium trust shared hosting

Hi at all. I've a big problem with GoDaddy Shared Hosting. I've written an ASP.NET application with MySql Database, but my application can't run, with the "Security Exception" error. The problem is that mysql connector must be recompiled with some .... different option. But i can't recompile.. i got always error. So i'm asking you if someone have a link for a mysql connector version able to run in medium trust environment.Very Thanks in advance.Bye

insert query from ms SQL server into a mysql linked server

INSERT into openquery(dbserver1MySQL,'select * from graham.lookup_in_table') select * from NavteqAPAC.dbo.Admin_Names   is giving me the following error! Please help me   OLE DB provider "MSDASQL" for linked server "dbserver1MySQL" returned message "[MySQL][ODBC 5.1 Driver][mysqld-5.1.49-community]Commands out of sync; you can't run this command now". Msg 7343, Level 16, State 2, Line 1 The OLE DB provider "MSDASQL" for linked server "dbserver1MySQL" could not INSERT INTO table "[MSDASQL]".

passing parameter using ODBC - mysql

Dear All, I'm having problem on passing parameter on odbc because it's not working at all.  I tried this using sql and I have no problem at all. All are working fine.  Is there a different syntax on odbc?  Here's my code: Private Sub BindDetails() ' Obtain the index of the selected row Dim selectedRowIndex As Integer = GridEmployee.SelectedIndex ' Read the employee ID Dim IDNumber As Integer = GridEmployee.DataKeys(selectedRowIndex).Value ' Define data objects Dim conn As OdbcConnection Dim comm As OdbcCommand Dim reader As OdbcDataReader Dim connectionString As String = _ ConfigurationManager.ConnectionStrings( _ "mysqlconn").ConnectionString ' Initialize connection conn = New OdbcConnection(connectionString) ' Create command comm = New OdbcCommand("SELECT employee.IDNumber, employee.EmployeeID, project.ProjectName, team.TeamName, employee.Username, employee.`Password`, employee.LastName, employee.FirstName, employee.MiddleName, employee.NickName, employee.EmailAddress, employee.DateHired, employee.LengthService, employee.RegularizationDate, employeestatus.EmployeeStatusName, employee.Birthdate, employee.Mobile1, employee.Mobile2, employee.Phone1, employee.Address, employee.Colleg

automatic insert data to mysql table

hi all,             Actually i need to transfer data from one table to another table in mysql with codition of Time.for example i need to transfer data at 10.00am when user login at 10.00am it must be insert into another data table.. if anybody know time control  please reply me..C#Thank You,Arunabathan.G
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend