使用 SQL Server Compact 4.0 进行批量查询和替代方案(如果不支持)?
我正在尝试执行一个包含“批处理”命令的查询,据说 Compact 3.5 不支持这一点,但是我想避免使用 SQL Express 或更大的解决方案,以免在桌面上部署变得麻烦。
例如:
String query = String.Format("SELECT * FROM [Mytable] WHERE [Id] = 2; DROP TABLE...");
SqlCeCommand cmd= new SqlCeCommand(query , db.Connection);
该应用程序是常见.NET安全开发问题的测试平台,因此我需要支持批量查询以支持SQL注入问题。有趣的是,我不能只是为整个班级的学生承担巨大的部署负担,并让他们每个人都安装 SQL Server Express。
任何意见表示赞赏!
I'm trying to execute a query which contains "batched" commands, and supposedly this wasn't supported by Compact 3.5, however I want to avoid using SQL Express or a bigger solution that makes deployment on desktops cumbersome.
For example:
String query = String.Format("SELECT * FROM [Mytable] WHERE [Id] = 2; DROP TABLE...");
SqlCeCommand cmd= new SqlCeCommand(query , db.Connection);
The application is a testbed for common .NET secure development problems, so I need to support batched queries in order to support SQL injection issues. Funny as it gets, I can't just roll a huge deployment burden for an entire class of students and make each one of them install SQL Server Express.
Any comments appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不支持...我将代码库移至 SQLite3。就像魅力一样。考虑到它是公共领域,我建议使用 Compact 的人放弃它而使用 SQLite!
Unsupported... I moved the code base to SQLite3. Works like a charm. Considering it's public domain I would recommend people using Compact to ditch it for SQLite!