Click here to Skip to main content
14,217,717 members
Rate this:
Please Sign up or sign in to vote.
hi all,

i am trying to insert a table values into azure sql database through wcf service in windows phone7. please any body help to me how can i insert values.

TIA
nareshrajuu
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

in wcf service operation contract use the follwoing connection string which is for sql azure code
SqlConnection con = new SqlConnection("Server=tcp:your server name;Database=Registration;user id=user id;password=password;Trusted_Connection=False;Encrypt=True;");


now write the code for inserting the data into the database by using following code
SQlCommand cmd=new SqlCommand();
cmd.Connection = con;
            cmd.CommandText = "insert into DownloadsData values('" + pc.Username + "','" + pc.Title + "')";
            con.Open();
            cmd.ExecuteNonQuery();
            con.Close();
   
Comments
Unareshraju 15-May-12 7:03am
   
thank u so-much to reply,
please could you suggest to me through the example url,s.
Rate this:
Please Sign up or sign in to vote.

Solution 3

i followed these steps

i login into windows Azure Sql database
inthat -->goto Design
select the table which you editable table
then----->goto edit

then select Data --->
and then edit your perticulars
(suppose if u want to add new row click on addnewrow in the bottom of your table aswllas add column also)
after that we should click on the Save otherwise won't be change.

that's all!!!!!!!!!!!.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100