SqlConnection con = new SqlConnection(@"Data Source=.\sqlexpress;Initial Catalog=Mychat;Integrated Security=True"); con.Open(); SqlCommand cmd = new SqlCommand("select * from KWRD", con); SqlDataAdapter adp = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adp.Fill(ds, "KWRD"); foreach (DataRow row in ds.Tables["KWRD"].Rows) { string s1 = row["Keywords"].ToString(); MessageBox.Show(s1); this.axAgent2.Characters.Load("Merlin", @"C:\Windows\MSAgent\chars\merlin.acs"); AgentObjects.IAgentCtlCharacterEx character = this.axAgent2.Characters.Character("Merlin"); character.Show(null); character.Speak(s1, null); }
row
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)