Database Proxy
Installation
Install the farm solution using stsadm or powershell
Development
Use this code in your sandbox solution to call a database
using Com.CodePlex.SPC3.DatabaseProxy;
using Microsoft.SharePoint.Utilities;
SqlDataReaderProxyArgs args = new SqlDataReaderProxyArgs();
args.ConnectionString = "Data Source=;Initial Catalog=;User ID=;Password=";
args.Command = "select * from sys.indexes";
args.CommandType = CommandType.Text;
args.Parameters.Add(new KeyValuePair<string, object>() { Key = "Id", Value = "1"});
string assemblyName = typeof(SqlDataReaderProxyOperation).Assembly.FullName;
string typeName = typeof(SqlDataReaderProxyOperation).FullName;
object result = SPUtility.ExecuteRegisteredProxyOperation(assemblyName, typeName, args);