I have this code:
SqlConnection con = new SqlConnection();
con.ConnectionString = "Data Source=SYNCLAPN136;Initial Catalog=Testdata;Integrated Security=True;Connect Timeout=30";
con.Open();
string command = "INSERT INTO [Table_1] (xName, yName) VALUES(@x, @y)";
SqlCommand cmd = new SqlCommand(command, con);
cmd.Parameters.Add("@x", date);
cmd.Parameters.Add("@y", val);
cmd.ExecuteNonQuery();
con.Close();
return date;
Those date and values are generated randomly..
I need to add the data to each 30 sec... how to achieve this?