I have not completed the code ...but why am i getting error inside while loop saying cannot convert string to int...when i am not converting string to int
namespace book
{
public partial class car : Form
{
public car()
{
InitializeComponent();
}
void FilCombo()
{
SqlConnection conn = new SqlConnection("Data Source=PRAVEEN\\SQLEXPRESS;Initial Catalog=travelbooking;Integrated Security=True");
SqlCommand cmd = new SqlCommand("select *from Carss travelbooking.Carss", conn);
conn.Open();
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read())
{
string sname = reader.GetString("CarName");
}
}