System.data

I need to connect to a database from a c# unity script.

Its failing at the import stage though:

using System.Collections;
using System.Linq;
using System.Data;
using System.Data.SqlClient;

public class DatabaseConnector  {


	
	public List<string> getTopApps() 
	{	
		
		List<string> returnString = new List<string>();
		
		string connectionString= 
				@"Data Source=myIP" + 
				@";Initial Catalog=myCatalog" +
				@";User Id=username" + 
				@";Password=passwrd";
				
		SqlConnection getConn = new SqlConnection(connectionString);
		SqlCommand getComm = new SqlCommand("select * from applications",getConn);
		
		try
		{
			getConn.open();
			using (SqlDataReader reader = getComm.executeReader()) 
			{
				DataTable dt = new DataTable();
				dt.Load(reader);	
			}	
		}
		return returnString;
	}
}

leads to error:

The Mono libraries supplied with Unity don’t implement the whole of the most recent .NET framework. You’ve discovered one of the missing parts here.

Basically you have to stick with .net 2.0 (more or less). So, no Linq etc.

–Eric