This is a migrated thread and some comments may be shown as answers.

Insert failure.Has no column...

4 Answers 139 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Krasimir
Top achievements
Rank 1
Krasimir asked on 29 Mar 2011, 09:06 AM

Hello,

  I am getting this exception when trying to save to a database an object graph:

Insert of '1830272635-' failed: Telerik.OpenAccess.RT.sql.SQLException: SQLite error
table Programs has no column named group_id2
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()
   at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)
INSERT INTO [Programs] ([created], [device_type], [group_id], [last_edited], [group_id2], [program_name]) VALUES (?, ?, ?, ?, ?, ?)
(set event logging to all to see parameter values) Telerik.OpenAccess.RT.sql.SQLException: SQLite error
table Programs has no column named group_id2
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute()
   at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32[] fieldNos, CharBuf s, Object[] oidData, IntArray toUpdateIndexes)

Of course I don't have a column "group_id2" in Programs table, so this is somehow automatically generated. I have a primary key "id", set to autoincrement (in the ddl definition), and in Visual Designer I have Default as Identity Mechanism for that class, if that's relevant.

Could you point me to where the problem might be?

4 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 31 Mar 2011, 10:18 PM
Hello Krasimir,

It seems that you did not update the database schema with the changes from the domain model. You could use theUpdate Database from Model wizard in order to achieve that goal.
Hope that helps. If any other questions arise, do not hesitate to contact us back.

Greetings,
Damyan Bogoev
the Telerik team
0
G
Top achievements
Rank 1
answered on 19 Apr 2011, 10:59 AM
Hi, may I have a question regarding to insert failures: 
We can see in the error message: "(set event logging to all to see parameter values)"
It would be usefull if I could see the par. values, but I don't know where and how can I set this "event logging" to "all".
Many thanks!
N.G.
0
PetarP
Telerik team
answered on 20 Apr 2011, 01:29 PM
Hi G,

 If you open the model settings ( right click in your domain model and choose show model settings) you will see a tab backend settings. If you select it there you will see another subtab Tracking and logging. This tab contains all the settings for our tracing functionality and form there you can alter them.

Kind regards,
Petar
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
G
Top achievements
Rank 1
answered on 20 Apr 2011, 05:18 PM
Thank you!
N.G.
Tags
Data Access Free Edition
Asked by
Krasimir
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
G
Top achievements
Rank 1
PetarP
Telerik team
Share this question
or