public void insertProduct(ProductTO product) { SqlCommand retcmd = new SqlCommand("insert into [ProjectProductSearch] ([username], [productText], [store]) values (@username, @productText, @store)", dbconnection); SqlParameter usernameParam = new SqlParameter("@username", product.usernameTextValue); SqlParameter productTextParam = new SqlParameter("@productText", product.comparisonTextValue); SqlParameter storeParam = new SqlParameter("@store", product.store); retcmd.Parameters.Add(usernameParam); retcmd.Parameters.Add(productTextParam); retcmd.Parameters.Add(storeParam); try { dbconnection.Open(); retcmd.ExecuteNonQuery(); } catch (Exception ee) { } }