[英]Do I have to use a disconnected approach when only inserting in a database?
We need to create a small website with a database (accdb) in ASP.NET. 我们需要在ASP.NET中创建一个带有数据库(accdb)的小型网站。 This database will only have records added while it's in operation (gathering survey data). 该数据库仅会在运行时添加记录(收集调查数据)。 Our teacher prefers to use DataSets (disconnected approach) for any database, but this is overkill for such a small website. 我们的老师更喜欢对任何数据库使用数据集(断开连接的方法),但这对于这么小的网站来说实在是太过分了。 This is why I was wondering, is there any reason not to use a connected approach (DataReader)? 这就是为什么我想知道,是否有任何理由不使用连接方法(DataReader)? Can any concurrency errors occur when only inserting? 仅插入时会发生任何并发错误吗?
In other words: connected or disconnected approach when you only insert into the database? 换句话说:连接或断开连接的方法何时只插入数据库?
技术答案是“否”,因为断开连接的方法对插入操作没有任何意义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.