What does “Data Source cannot be empty. Use :memory: to open an in-memory database” mean?

后端 未结 4 2076
野趣味
野趣味 2021-01-17 12:15

I recently converted my SQL Server database into SQLite DB. But when I try to open my SQLite using .Open() it throws me this error:

Data Source          


        
4条回答
  •  醉酒成梦
    2021-01-17 12:54

    There's a space after your data source: Data Source= D:\XXX.db. Also, in your copy/paste, there's no closing quote to the connection string. Here's a connection string that works for me for the testing tool:

    @"Data Source=C:\Temp\Test.db3;Pooling=true;FailIfMissing=false;Version=3"
    

提交回复
热议问题