Dave Jellison
Dave Jellison

Reputation: 933

Silverlight SQL 2005

I want to allow a user to provide their SQL login credentials, and display local SQL tables, stored procs, etc. in a listing. Is this possible? Note: I do not want to install some local, small SQL variant. I'm talking about the full version of SQL 2005+ that's already sitting on a developer's workstation.

Upvotes: 0

Views: 129

Answers (3)

Joel Coehoorn
Joel Coehoorn

Reputation: 416039

Something I almost missed is that you don't want to connect back to a database on the web server. You want information about a possible sql server instance on the user's (developer's) local machine. That isn't possible from within Silverlight alone.

I had thought you might be able to send the credentials on to the web server, have it dynamically generate a connection string, and then use the information_schema views to return lists of tables and views like any other data source. But that won't work.

However, in that scenario the web server is essentially acting as a proxy for your silverlight app. You might be able to build something else to act a proxy instead. Perhaps a small clickonce winforms app. That would install from a web page via hyperlink, so you could craft a link to install it on the page hosting your silverlight app.

Upvotes: 1

Aaron Fischer
Aaron Fischer

Reputation: 21231

With silverlight you cannot access the local machine/network resources. you will need to use wpf/xbap.

Upvotes: 0

Justin Niessner
Justin Niessner

Reputation: 245449

Silverlight provides no mechanism for connecting to a SQL Database directly. You either need to provide a set of web services to interface with your data source or use ADO.NET Data services.

Connecting to a local SQL database using Silverlight alone isn't possible.

Upvotes: 3

Related Questions