views:

5993

answers:

5

I am a newbie in silverlight. and I want to know that how can we connect our application to a Database. I am using a SQL 2005 server as a Database. and I don't want to use Linq... so please suggest me how can i make connectivity either directly in silverlight or by using a web service

I don't have any problem in using webservices. Please provied me the sample code or an link with example will be helpful...

Thanks

+1  A: 

Um, this would be a very bad thing to do. If you need data from the database you could use a web service to help you gather that info through the use of several methods but if what you're trying to do is allow your Silver Light app to execute SQL queries directly you're going about this the wrong way.

Spencer Ruport
fine i don't have any problem with using webserivce. but could you please tell me how to do that way a piece of code or an example link will be helpful
Meetu Choudhary
Basically, add a "Silverlight-enabled WCF Service" to your web project. Then in the Silverlight project add a web-reference and point it at the URL for your svc file.That's the basics, if you need to authenticate or protect private data, then you open a WHOLE new bag of worms.
eidylon
+2  A: 

Here is a great set of documentation on using ADO.Net data services in Silverlight.

Michael S. Scherotter
msdn is always good but i found other 2 good articles and eassy to understand.
Meetu Choudhary
+3  A: 

I found the answer to my question upto a good extent... so sharing with you all

Check this link it contains a great set of documentation on using ADO.Net data services in Silverlight.

I found one more good article so editing my answer.... but its the luck if this works for you if not then author of the article donot respond :( quite sad...

Here is the best link i found hurry!!! It solves the problem.. Lots of thanks to kencox

Meetu Choudhary
+1  A: 

ADO .net RIA Services (still in Beta) is another possiblity:

http://msdn.microsoft.com/en-us/magazine/dd695920.aspx

HTH Braulio

Braulio
A: 

Try EffiProz Silverlight embedded database. Written Entirely in C# and comes with ADO.NET style provider. http://www.effiproz.com/product_sl.aspx

Anatali