This is a migrated thread and some comments may be shown as answers.
Appointment, Resources, AppointmentResources and INSERT issue with Identity
1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 02 Feb 2011, 03:05 PM
I am struggling with databinding the RadScheduler.
I have the tables created, the constraints/relationships set up just fine.
When I assign a resource to an existing appointment, the row is added to the AppointmentResource relationship table just fine into the database.

However, when I try to assign a resource to a new appointment, I get a constraint error.
When I remove the constraints, I see values like -4 in the AppointmentId column in the AppointmentResource table.
So, I'm assuming that, since the AppointmentId in the Appointment table is set to IDENTITY, the code that handles the relationships doesn't know the AppointmentId yet when creating the rows to add to the AppointmentResource table.
Is anyone aware of this, and do you have a workaround?  I'm thinking the only workaround is to bind to objects and do the database code myself..

1 Answer, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 07 Feb 2011, 04:00 PM
Hello John,

Thank you for writing.

The IDENTITY field is not get by default when you are using a MSAccess data table. We provide an example in the Examples application shipped with our suite (section Scheduler >> Databinding)
which demonstrates how to synchronize the IDENTITY field. In addition, you can find the available documentation for data binding here. It is important to set the name of the relation name to the Resources property of the AppointmentMappingInfo object.

I hope that this will help you. In case that you have other related questions, feel free to write back.

Best wishes,
Dobry Zranchev
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Asked by
John
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
Share this question
or