Unable to establish database connection in Windows Store app
Posted: Sat 16 Mar 2013 22:36
In my Windows (8) Store app Visual Studio 2012 project I added references to Devart.Data and Devart.Data.SQLite. In my App.xaml.cs file I included
using Devart.Data.SQLite
using Devart.Data;
I tried to establish a database connection by
SQLiteConnection NPDConnection = new SQLiteConnection();
NPDConnection.ConnectionString = @"Data Source=J:\Software Development\NonProfitDemographics\NonProfitDemographics.db;FailIfMissing=True;";
I get the error "The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data'.
However, when I add a reference to this assembly I then get the error
"The base class or interface 'System.ComponentModel.Component' in Assembly 'System' referenced by type 'System.Data.Common.DbConnection' could not be resolved."
Any suggestions what I might be doing wrong? Thanks.
using Devart.Data.SQLite
using Devart.Data;
I tried to establish a database connection by
SQLiteConnection NPDConnection = new SQLiteConnection();
NPDConnection.ConnectionString = @"Data Source=J:\Software Development\NonProfitDemographics\NonProfitDemographics.db;FailIfMissing=True;";
I get the error "The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data'.
However, when I add a reference to this assembly I then get the error
"The base class or interface 'System.ComponentModel.Component' in Assembly 'System' referenced by type 'System.Data.Common.DbConnection' could not be resolved."
Any suggestions what I might be doing wrong? Thanks.