连接到sqlite [英] Connecting to sqlite

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

问题描述

您好b $ b

我想从Windows C#连接到sqlite数据库文件。我有来自谷歌的连接字符串。但我希望连接不使用参考DLL文件,但使用cpp文件,并需要知道如何关闭连接。使用..

解决方案

1.在C#中使用SQLite,您可以使用ADO.NET和SQLite的.NET提供程序(System.Data)直接访问它。 Sqlite),详见下文:

http: //www.dreamincode.net/forums/topic/157830-using-sqlite-with-c%23/ [

target =_ blanktitle =New Window> ^
]



2.或者您可以使用Entity Framework访问数据库,请参阅下一篇文章中的详细信息:

将SQLite嵌入式数据库与实体框架和Linq-to-SQL一起使用

sqlite-with-entity-framework-code-first-and-migration

Hi
I want to connect to sqlite database file from windows C#. i have got the connectionstring from the google. but i want connect not using reference DLL file but using the cpp file and need to know how to close the connection also. using that..

解决方案

1.For using SQLite in C# you could access it directly by using ADO.NET and the .NET provider for SQLite (System.Data.Sqlite), see details bellow:
http://www.dreamincode.net/forums/topic/157830-using-sqlite-with-c%23/[
target="_blank" title="New Window">^
]

2.Or you can use Entity Framework for accessing the database, see details in the next articles:
Using SQLite Embedded Database with Entity Framework and Linq-to-SQL
sqlite-with-entity-framework-code-first-and-migration


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

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