嗨,我如何在visual studio 2015中创建.sdf数据库文件 [英] Hi , how do I create a .sdf database file in visual studio 2015

查看:109
本文介绍了嗨,我如何在visual studio 2015中创建.sdf数据库文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试编写具有底层sql数据库的软件。但是在安装时,它会与其数据库一起安装。我不想在客户端计算机上安装sqlexpress服务器以运行我的软件。我做了一些研究,并意识到我的答案是在.sdf而不是.mdf数据库文件中。我的系统安装了sql compact 4.0,但我不知道如何使用它。



我尝试了什么:



项目菜单 - >添加 - >新商品 - >模板 - >数据 - >基于服务的数据库



我找不到本地数据库的选项。

我甚至尝试添加对程序集的引用但没有成功。我如何继续请

I've been trying to write software that has has underlying sql database. But such that upon installation, it installs along with its database. I dont want to install a sqlexpress server on a client machine for my software to run. I've done some research and have realized that my answer is in .sdf and not in .mdf database files. My system has sql compact 4.0 installed but i dont know how to use this.

What I have tried:

Project Menu -> Add -> New Item -> Templates -> Data -> service-based database

I dont find the option for local database.
I even try adding the reference to the assembly with no success. How do i proceed please

推荐答案

从Google开始: sql compact 4.0 c - Google搜索 [ ^ ]

我直接在这里:解决方法:在Visual Studio中使用SQL Server Compact [ ^ ]

此处: SqlCeConnection类(System.Data。 SqlServerCe) [ ^ ]

并且......你明白了。
Start with Google: sql compact 4.0 c - Google Search[^]
It took me straight here: Walkthrough: Working with SQL Server Compact in Visual Studio[^]
And here: SqlCeConnection Class (System.Data.SqlServerCe)[^]
And ... you get the idea.


这篇关于嗨,我如何在visual studio 2015中创建.sdf数据库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆