I'm getting an sqlexception of SQLexception on insertion, can't see the problem. Here is the class method:
public void InsertAppointment(int id, string timedate, string location, string subject, string doctor, int distance, string newMeds, int state)
{
string str = "INSERT INTO AppointmentsInformation (ID, TimeDate, Location, Subject, DoctorID, Distance, NewMedicines, state) VALUES (@id, @timedate, @location, @subject, @doctor, @distance, @newMeds, @state)";
try
{
SqlConnection cn = new SqlConnection(_connectionString);
...
Go to the complete details ...