hi ,, i have a problem in my web app .. i have a calendar and i want to get the day number id from a table and to put it in another table. I want to find my error , please help me. the code is like this:
Code:
String day ="SELECT ID FROM Ditet WHERE Dita = ('" + Calendar1.SelectedDate.Day + "') "; SqlCommand day1 = new SqlCommand (day , con); string day3 = day1.ExecuteScalar().ToString(); String vizita = "INSERT INTO [Vizita] (ID_dita) VALUES ('" + day3 + "')"; SqlCommand cmd1 = new SqlCommand( vizita, con); cmd1.ExecuteScalar();
Comment