简体   繁体   English

使用C#以编程方式创建和填充VistaDB数据库

[英]create and fill VistaDB database programmatically using c#

Is it possible to create a VistaDB database programmatically using C#. 是否可以使用C#以编程方式创建VistaDB数据库。 My requirement is that I have a SQL Server database with some thousand rows and I want to programmatically create the same schema and export some hundred rows to an embedded database like VistaDB and ship to the client. 我的要求是我有一个具有数千行的SQL Server数据库,并且我想以编程方式创建相同的架构,并将数百行导出到嵌入式数据库(如VistaDB)中并运送到客户端。 I know I can use VistaDB data migration wizard, but I need to do it programmatically using C# ( because it is the client who will do the data export thing). 我知道我可以使用VistaDB数据迁移向导,但是我需要使用C#以编程方式进行操作(因为它将由客户端来执行数据导出操作)。

Absolutely! 绝对! Everything the data migration wizard and DataBuilder do ultimately is expressed as calls to the public API of the VistaDB engine. 数据迁移向导和DataBuilder最终所做的所有工作都表示为对VistaDB引擎公共API的调用。 There are two ways to get things done - SQL Scripts (like you would use with SQL Server) and the DDA API which is proprietary to VistaDB. 有两种方法可以完成任务-SQL脚本(如您将与SQL Server一起使用)和VistaDB专有的DDA API。 The current version of VistaDB has a number of differences between SQL Server's syntax and its accepted syntax for schema manipulation (that's a gap we're going to be closing with VistaDB 5) but you can do pretty much anything you want. VistaDB的当前版本在SQL Server语法和其用于模式操纵的语法之间有许多区别(这是我们将要在VistaDB 5中消除的差距),但是您可以做任何您想做的事情。

You may find it easiest to use the DDA API since it's more API oriented, less script oriented. 您可能会发现使用DDA API最简单,因为它更面向API,而较少面向脚本。 Here is a good spot to get started in the documentation: VistaDB DDA Assembly Help 这是开始阅读文档的好地方: VistaDB DDA Assembly帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM