使用ADO.NET时,SQLite和TSQL只读连接 [英] Readonly connections with ADO.NET, SQLite and TSQL

查看:119
本文介绍了使用ADO.NET时,SQLite和TSQL只读连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的code通过一个连接读取,并通过另一个写。我不想意外地读连接写。我怎样才能使连接只读?我使用的SQLite ATM和将其转换的code部分,以TSQL当原型已经结束了。

My code reads via one connection and writes via another. I dont want to accidentally write with the read connection. How can i make the connection readonly? I am using SQLite ATM and will convert sections of code to tsql when the prototype is over.

推荐答案

您可以添加只读=真到了只读连接。

You can add Read Only=True to the read-only connection.

Data Source=filename;Read Only=True;

这篇关于使用ADO.NET时,SQLite和TSQL只读连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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