从SqlCommand对象获取生成的SQL语句?
Using cmd As SqlCommand = Connection.CreateCommand cmd.CommandText = "UPDATE someTable SET Value = @Value" cmd.CommandText &= " WHERE Id = @Id" cmd.Parameters.AddWithValue("@Id", 1234) cmd.Parameters.AddWithValue("@Value", "myValue") cmd.ExecuteNonQueryEnd Using
UPDATE someTable SET Value = "myValue" WHERE Id = 1234
Cats萌萌
犯罪嫌疑人X
相关分类