views:

347

answers:

2

I'm using SQLite ADO.NET in my project so that I can unit test using an in-memory database. I want a copy of my real database but it is across the server. From what I've read, it looks like I have to specify ":memory" for the data source for the SQLite connection string. My problem is that I don't even know if it's possible to load a remote database into memory that is not a SQLite database, or how to do it? Any thoughts on how this could be done? It's not a large db--maybe 5 megs at most. Thanks for the input!

+1  A: 

Actually, figured out it doesn't matter--I can't use SQLite with ADO.NET because my queries are all T-SQL.

Austin
A: 

You don't really need an in-memory database, you can use SQL Server Express on your PC, or a unit-testing VM.

You could overwrite the database file each time you run the test.

Osama ALASSIRY