Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working on an application where i am populating controls from the database table, for this i have written linq query to fetch the data.

The data can be fetched from the databse but when i try to insert values in the table it just doesn;t do anything. The values are not getting stored in the table and there is no error or exception generated while doing the same.

I am using this piece of code to insert the value.

C#
Tasks tsk = new Tasks
                {
                    game_id = 1,
                    platform_id = 1,
                    version_id = 1,
                    description = "abcd",
                    activity_name = "abcd",
                    projected_start_date = Convert.ToDateTime("01/13/2010"),
                    projected_end_date = Convert.ToDateTime("01/14/2010"),
                    duration = 1,
                    parent_task_id = 1
                };
svcContext.MergeOption = MergeOption.AppendOnly;
svcContext.AddObject("Tasks", tsk);
svcContext.UpdateObject(tsk);


i have tried using BeginSavechanges :doh: as well as endSave changes but that also didnt work.

I am stuck with this and any help of this will be greatly appreciated. :)
Posted
Updated 5-Feb-10 11:20am
v2

Silverlight with ADO.Net?

There is no ADO.Net in Silverlight.
 
Share this answer
 
According to Bing[^], there is some connection between ADO.NET and silverlight. I would guess that there's an issue with where the table lives, and perhaps there's a local copy that gets modified by then replaced by the server one ? I would suggest reading up on the article I linked to, to understand how ADO.NET works with silverlight. I'd have guessed if the DB was on a server, that silverlight would use webservices to talk to it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900