Jeff-Lewis / codesmith

Automatically exported from code.google.com/p/codesmith
0 stars 0 forks source link

Attempt to write a read-only database #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate Dbml, then geneterate enitites

On large database (200 tables+) the generation of the enitity layer does 
not complete. It stops at tables randomly with the error message and stack 
trace below. 

My database is SqlServer 2005. I've tried using SqlSchemeProvider and 
AdoxScehemProvider but both have the same problem.

--------------

ERROR: D:\Profile\Documents\Visual Studio 2008\Projects\ConsoleApplication1
\ConsoleApplication1\CodeSmithProject1.csp(0,0) Attempt to write a read-
only database
attempt to write a readonly database
Stack Trace:
   at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
   at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, 
CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior 
behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
   at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection 
connection, Boolean deferredLock)
   at System.Data.SQLite.SQLiteConnection.BeginDbTransaction
(IsolationLevel isolationLevel)
   at System.Data.SQLite.SQLiteConnection.BeginTransaction()
   at CodeSmith.Engine.ConfigurationBase.SetValue[T](String name, T value)
   at CodeSmith.Engine.Configuration.set_LinesGenerated(Int64 value)
   at CodeSmith.Engine.Configuration.UpdateLinesGenerated(String 
generatedCode)
   at CodeSmith.Engine.CodeTemplate.OnPostRender(String result)
   at CodeSmith.Engine.CodeTemplate.RenderToFile(OutputFile outputFile, 
String sourcePath, IMergeStrategy strategy)
   at CodeSmith.Engine.CodeTemplate.RenderToFile(String path, String 
sourcePath, IMergeStrategy strategy)
   at CodeSmith.Engine.CodeTemplate.RenderToFile(String path, 
IMergeStrategy strategy)
   at _CodeSmith.Entities_cst.CreateEntity(EntityGeneratedClass 
entityClass, EntityEditableClass partialClass, Type type, String 
rootDirectory) in d:\Projects\plinqo-v3.0.687\CSharp\Entities.cst:line 246
   at _CodeSmith.Entities_cst.CreateEntityClasses(Database database) in 
d:\Projects\plinqo-v3.0.687\CSharp\Entities.cst:line 193
   at _CodeSmith.Entities_cst.Generate() in d:\Projects\plinqo-v3.0.687
\CSharp\Entities.cst:line 83
   at _CodeSmith.Entities_cst.__RenderMethod1(TextWriter writer, Control 
control) in d:\Projects\plinqo-v3.0.687\CSharp\Entities.cst:line 305
   at CodeSmith.Engine.DelegateControl.Render(TextWriter writer)
   at CodeSmith.Engine.Control.RenderChildren(TextWriter writer)
   at CodeSmith.Engine.Control.Render(TextWriter writer)
   at CodeSmith.Engine.CodeTemplate.Render(TextWriter writer)
   at CodeSmith.Engine.CodeTemplate.RenderToString()
   at CodeSmith.Engine.ProjectCodeGenerator.GenerateCode(CodeSmithProject 
csp)
Unable to render output Entities, skipping...
Done rendering outputs: 0 succeeded, 2 failed, 0 skipped (9763ms).

Original issue reported on code.google.com by nig...@gmail.com on 5 Jun 2009 at 11:07

GoogleCodeExporter commented 9 years ago
This issue should be fixed in the latest build of CodeSmith.  Please download 
the 
latest build of codesmith from 
http://www.codesmithtools.com/download/builds/codesmithprofessional-51-build.msi
.  We 
are planning to release 5.1.2 early next week.

Original comment by shannon....@gmail.com on 6 Jun 2009 at 4:04

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 7 Oct 2009 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 30 Dec 2009 at 5:43

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 30 Dec 2009 at 6:04

GoogleCodeExporter commented 9 years ago

Original comment by shannon....@gmail.com on 30 Dec 2009 at 9:16