2012-06-27 2 views
0

VS 2010 솔루션을 일부 단위 테스트를 실행하고 SQLite 내 데이터베이스로 사용하려고합니다.System.Data.SQLite.SQLiteException : SQLite 오류 해당 테이블 오류가

"그런 테이블에 SQLite는 오류 : dbo.vDimIncident을 : System.Data.SQLite.SQLiteException 예외를 던져하지 AECI.Clio.RecordableIncidentRate_Test.TestClass.QueryDataTest 시험 방법 :"문제는 내가 다음과 같은 오류를 얻을 수있다

SQLBrowser를 사용하여 테이블이 있는지 확인합니다. 심지어 테이블의 이름을 vDimIncident에서 dbo.vDimIncident로 바꿔서 시도해 보았습니다.

내가 잘못하고있는 것이 확실하지 않습니다. 이 아무것도 할 아무것도 것인지 잘 모르겠습니다

System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain) 
System.Data.SQLite.SQLiteCommand.BuildNextCommand() 
System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index) 
System.Data.SQLite.SQLiteDataReader.NextResult() 
System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) 
System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) 
System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior) 
System.Data.Common.DbCommand.ExecuteReader() 
System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) 
System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) 
System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) 
System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() 
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) 
System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) 
AECI.Clio.RecordableIncidentRate.Harvester.QueryData(HarvestTargetTimeRangeUTC ranges) in C:\tfsprod\AECI.Clio.RecordableIncidentRate\Harvester.cs: line 43 
AECI.Clio.RecordableIncidentRate_Test.TestClass.HarvesterHandle.QueryDataTest(HarvestTargetTimeRangeUTC ranges) in C:\tfsprod\AECI.Clio.RecordableIncidentRate_Test\TestClass.cs: line 167 
AECI.Clio.RecordableIncidentRate_Test.TestClass.QueryDataTest() in C:\tfsprod\AECI.Clio.RecordableIncidentRate_Test\TestClass.cs: line 54 

하지만 여기 내 연결 문자열입니다 : 여기 내 오류 추적이다

public void ConfigureHarvester(System.Configuration.Configuration configuration) 
{ 
    context = new DataClassesDataContext(new System.Data.SQLite.SQLiteConnection(@"Data Source= C:\tfsprod\C#SQLite\Community.CsharpSqlite.shell\bin\Debug\test.db")); 

} 
+1

좋은 db 파일을로드하는 것을 다시 확인 했습니까 (경로 검사)? – cichy

+0

@cichy - 예, 경로가 좋으며 dbite 파일을 SQLite 데이터베이스 브라우저에서 열 수 있습니다. –

답변

0

내가 그것을 알아 냈어. dbml 파일로 이동 한 다음 데이터 클래스의 속성으로 이동하여 "dbo"를 제거해야했습니다. 내 테이블 이름 앞에서. 나는 이것이 그 일을하는 적절한 방법인지는 모르지만 그것은 효과가있다.

관련 문제