There are times when a person just wants to pull out all his hair and give UP! Man i have tried so much and most of it is futile. I understand what you are saying is correct and also that DataReader doesnt support disconnected interface and it boils down that i have to use datasets, if i want multi threaded access on a in-memory database.
Adding more mystery to this is that when i modified the pervious code and removed all readerWriterLock checking and stopped Select (i.e. read thread) thread and only had one thread (insert) thread running, the number of records inserted per second fell and kept falling as soon as it crossed 15,000 record mark. The previous code was showing almost 10,000 insertions per second (which is unbelieveable) consistently till 2,50,000 records (more unbelieveable).
Anyways not let me ask a very direct question. Right now i am using Access (As a logging database) as database and want to replace it with SQLite with data source set as memory. And because both the insert and selects can be asynchronous, i need to ensure thread safety without comprising speed (that's why i was using DataReader its fast and very easy to use (much like recordset)).
Now the direct question is IS THERE SOME WAY TO DO THIS?
Thanks in advance.