I need to download data from a mysql database on the web, using vb.net.
Could you tell me how to do it, as I cant find any documentation about
----
You probably won't mind this code is in JScript.NET, insetead of VB.NET
It creates a XmlDataDocument, loads in it data from DataSet, saves to a
XML file...
I have to use the iso8859_unicode function though, as unicode gets
corrupted somewhere inbetween... You may not need it.
var MyConString = "Data Source=" + DataSource + ";Database=" + Database
+ ";User ID=" + UserID + ";Password=" + Password;
var mycon = new MySqlConnection(MyConString);
var query = "SELECT * FROM TableName;"
var ds: DataSet = new DataSet();
var adapter : MySqlDataAdapter = new MySqlDataAdapter();
adapter.SelectCommand = new MySqlCommand(query, mycon);
adapter.Fill(ds);
var datadoc = new System.Xml.XmlDataDocument(ds);
var d = new System.Xml.XmlDocument();
d.LoadXml(datadoc.OuterXml);
d.InnerXml = iso8859_unicode(d.InnerXml);
d.Save("D:/***/dbbkp.xml")
adapter.Dispose();
mycon.Dispose();
mycon = null;