开发者

Batched queries with SQL Server Compact 4.0 and alternatives if unsupported?

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 Sql开发者_StackOverflow社区CeCommand(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!


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜