Hi i got an error while connection to my sqlitedb.
I create my sqlitedb using Firefox Sqlite Addon.
MyConn : (webconfig)
<connectionStrings>
<add name="TARKMANCAS_CONNECTION" connectionString="Data Source=C:/TARKMANCAS_DB.sqlite;"/>
</connectionStrings>
MyClass:
public TarkBaseDb()
: base("TARKMANCAS_CONNECTION")
{
}
// start
//
public Table<TarkBaseSchema.KadroGrubuCls> KadroGrubu { get { return GetTable<TarkBaseSchema.KadroGrubuCls>(); } }
TarkBaseSchema:
[TableName("EGITIM_KADROSU_GRUBU_TAB")]
public class KadroGrubuCls
{
private TarkBaseDb db = new TarkBaseDb();
#region Contructors
public KadroGrubuCls()
{
using (db)
{
var qry = from x in db.KadroGrubu
select x;
foreach (var rec_ in qry)
{
KadroGrubuId = rec_.KadroGrubuId;
KadroGrubu = rec_.KadroGrubu;
}
}
}
#endregion
#region Data Items
[MapField("KADRO_GRUBU_ID")]
[PrimaryKey, NotNull]
public int KadroGrubuId { get; set; }
[MapField("KADRO_GRUBU")]
public string KadroGrubu { get; set; }
#endregion
#region Relations
#endregion
#region Public Methods
public KadroGrubuCls Get()
{
return (new KadroGrubuCls());
}
#endregion
}
And try a call:
TarkBaseSchema.KadroGrubuCls _tarkKadro = _tarkKadro.Get();
I got error :
A network-related or instance-specific error occurred while establishing a connection to
SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)