摘要:
下面的示例创建一个SqlCommand,然后使用ExecuteScalar执行它。向该示例传递两个字符串,一个字符串表示要插入到表中的新值,另一个字符串用于连接至数据源。如果已插入新行,则此函数会返回新的“Identity”列值,如果失败,则返回 0。static public int AddProductCategory(string newName, string connString){ Int32 newProdID = 0; string sql = "INSERT INTO Production.ProductCategory (Name) VALUES ... 阅读全文
posted @ 2011-09-19 16:56
ω♪zone咕咯
阅读(147)
评论(0)
推荐(0)

浙公网安备 33010602011771号