sYnced Posted March 1, 2013 at 11:07 AM Report #497503 Posted March 1, 2013 at 11:07 AM (edited) string server = "localhost"; string database = "clinica"; string uid= "root"; string password = ""; string MyConString = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";Allow Zero Datetime=true;"; MySqlConnection connection = new MySqlConnection(MyConString); string sQuery = "Select * from "+query+""; connection.Open(); MySqlDataAdapter myDA = new MySqlDataAdapter(sQuery, connection); myDA.SelectCommand.ExecuteReader(); DataTable MyDT = new DataTable(); myDA.Fill(MyDT); myDA.Update(MyDT); connection.Close(); Este é o meu código, é para projecto de escola, (estou a começar e quero fazer com mysql + datasets), ando a fazer testes mas não sei como executo algo como datareader aqui no dataset. Se alguém me poder enviar um pdf ou algo para eu ler e aprender agradeço. Edited March 1, 2013 at 11:16 AM by Caça GeSHi
bioshock Posted March 2, 2013 at 07:22 PM Report #497655 Posted March 2, 2013 at 07:22 PM https://wiki.portugal-a-programar.pt/dev_net/csharp/access/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now