0 LIKES LikeUnLike
In Visual Studio 2005, I get the error when trying to pull a query value from previous page:"System.NullReferenceException: Object reference not set to an instance of an object."Which refers to the line "string itemID = Request.QueryString["itemID"].ToString()...Here is some code:string itemID = Request.QueryString["itemID"].ToString()... SqlConnection dbConnect = new SqlConnection(ConfigurationManager.Conne... SqlCommand getProduct = new SqlCommand("SELECT * FROM PRODUCTS WHERE itemID=" itemID , dbConnect); //Open the connection. dbConnect.Open(); SqlDataReader myData = getProduct.ExecuteReader(); if (myData.HasRows) { //Advance the first records. myData.Read();
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 3 answers.