开发者

How do I populate a SQL Server Compact database?

So I'm building a windows app, and as a result, I'm going to use SQL Server Compact instead of the normal SQL Server as I figure it can then be run on any computer, not just one with SQL Server installed.

The problem is from what I've seen, you can't seem to do any scripting in SQL Compact, you can't declare vari开发者_开发问答ables, you can only do one statement at one time.

I generally have like a reference data script stored that I run everytime I rebuild the database. Is this possible in Compact?

The only thing I can think of is to build a seperate application that reads the script and manually runs each individual query, but that just seems cumbersome. However, is that the only way?


You can use my SQL Server Compact scripting Tools for this: http://sqlcetoolbox.codeplex.com (VS add-in) and http://exportsqlce.codeplex.com (command line)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜