If I run either table by itself, it works. However, if I run one table after
the other, the first table copies find and then the second table gives me the
exception 14. It does not matter in what order I run the two tables, the first
one works, the second one throws an exeption. Here is the code for the
insertion:
public class LookupRepository : ILookupRepository
{
private LookupDatabaseHelper _helper;
public LookupRepository(Context context)
{
_helper = new LookupDatabaseHelper(context);
}
public long insertCountry(string Country_Code, string Country_NCES,
string County_Name, string StartDate, string EndDate)
{
using (var database = new
SQLiteConnection(_helper.WritableDatabase.Path))
{
return database.Insert(new Country
{
CntryCd = Country_Code,
CntryNCESCd = Country_NCES,
CntryName = County_Name,
StrtDt = StartDate,
EndDt = EndDate
});
}
}
public long insertActivityCode(string ActivityTypeID, string
Description, string January, string February, string March, string April,
string May, string June, string July, string August, string September, string
October, string November, string December, string SeasonalFg, string
TemporaryFg, string CreateDate, string EndDate)
{
using (var databaseActivityCode = new
SQLiteConnection(_helperActionCode.WritableDatabase.Path))
{
return databaseActivityCode.Insert(new ActivityAction
{
ActivityType_ID = ActivityTypeID,
Descr = Description,
January = January,
February = February,
March = March,
April = April,
May = May,
June = June,
July = July,
August = August,
September = September,
October = October,
November = November,
December = December,
SeasnlFg = SeasonalFg,
TmpryFg = TemporaryFg,
CrtDt = CreateDate,
EndDt = EndDate
});
}
}
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Stephan Beal
Sent: Thursday, April 12, 2012 7:26 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] SQLite Exception 14
On Thu, Apr 12, 2012 at 4:22 PM, FLOWERDAY John
<[email protected]>wrote:
> right after the first table, I get an SQLiteException 14. I have
> searched the web and have found zero answers to this. I also cannot
> find an answer on the SQLite site. Any suggestions?
>
[stephan@host:~/cvs/fossil]$ grep -w 14 /usr/include/sqlite3.h
#define SQLITE_CANTOPEN 14 /* Unable to open the database file */
#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
#define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */
#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name
*/
#define SQLITE_TESTCTRL_RESERVE 14
sounds like the first one.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users