Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Error converting data type varchar to bigint.

$
0
0
 SqlCommand command = new SqlCommand();
            command.Connection = connection;
            command.CommandText = string.Format("select * from EmployeeType where id='Hierachy Update'", Id);

            SqlDataReader dataReader = command.ExecuteReader();

            if (dataReader.Read())
            {
                Employee = new EmployeeType();
                Employee.Id = Convert.ToInt64(dataReader["Id"]);
                Employee.Type = Convert.ToString(dataReader["Type"]);

            }

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>