Palash Sachan
Palash Sachan

Reputation: 61

connecting to sql database in windows store app c# xaml

how to connect to sql database in Windows Store App in Visual Studio 2013??

i can connect and run query on the sql database in Windows Forms Application like this

SqlConnection conn = new SqlConnection("Data Source=JOHNDON;Initial Catalog=Register;Integrated Security=True");
        SqlCommand cmd = new SqlCommand("insert into Student values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')", conn);
        conn.Open();
        cmd.ExecuteNonQuery();
        MessageBox.Show("Submit Successfully");
            conn.Close();

Now i want to do the same in Windows Store App also please help..thanks

Upvotes: 0

Views: 859

Answers (1)

Kamen
Kamen

Reputation: 3595

Check here - it is accomplished using WCF service:

http://www.c-sharpcorner.com/UploadFile/7e39ca/connect-windows-store-apps-to-sql-server-database-using-wcf/

Upvotes: 1

Related Questions