连接到SQL Server CE [英] Connect to SQL Server CE

查看:99
本文介绍了连接到SQL Server CE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是移动开发的新手,现在我正在尝试使用SQL Server CE作为数据库创建移动应用程序。有人可以在vb中提供一个连接到SQL CE的示例代码吗?或至少连接字符串?

任何帮助将不胜感激

I am new to mobile development and for now I''m trying to create a mobile application using SQL Server CE as database. Could someone please provide a sample code in vb that will connect to SQL CE? Or the connection string at least?
Any help would be greatly appreciated

推荐答案

展开 | 选择 | Wrap | 行号


谢谢Mark。这个更好。只是几个问题。假设我根据您的代码在运行时创建了数据库,在哪里可以找到它?或者假设我已经在某处创建了数据库(如SQL Server 2005),我应该在哪里放置SDF文件以避免连接字符串出现问题?实际上我觉得我的问题是我的连接字符串。
Thanks Mark. This is better. Just a few question though. Suppose I created the database on runtime based on your code, where can I find it? Or suppose i have created the database somewhere(like SQL server 2005), where should I place my SDF file to avoid problems in my connection string? Actually I think my problem here is my connection string.



谢谢Mark。这个更好。只是几个问题。假设我根据您的代码在运行时创建了数据库,在哪里可以找到它?或者假设我已经在某处创建了数据库(如SQL Server 2005),我应该在哪里放置SDF文件以避免连接字符串出现问题?其实我认为我的问题是我的连接字符串。
Thanks Mark. This is better. Just a few question though. Suppose I created the database on runtime based on your code, where can I find it? Or suppose i have created the database somewhere(like SQL server 2005), where should I place my SDF file to avoid problems in my connection string? Actually I think my problem here is my connection string.



我个人倾向于将数据库保存在我的应用程序文件夹中以避免出现问题。


ie

Personally I tend to keep the database in my application folder to avoid issues.

i.e.

展开 | 选择 | Wrap | 行号


这篇关于连接到SQL Server CE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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