Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
string selectStatement = "select sum(cast(NbrOfCopies as integer)) from tBooks"; FbCommand cmd = new FbCommand(selectStatement, bookConn); if (bookConn.State == ConnectionState.Closed) bookConn.Open(); int Count = Convert.ToInt32(cmd.ExecuteScalar()); // <-- crashes here! lblTotalCount.Text = "Total In Inventory: " + Count.ToString();
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
21 Experts available now in Live!