user34537
user34537

Reputation:

Readonly connections with ADO.NET, SQLite and 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.

Upvotes: 5

Views: 1181

Answers (1)

Samuel Neff
Samuel Neff

Reputation: 74949

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

Data Source=filename;Read Only=True;

Upvotes: 5

Related Questions