hello....i need your help. i got an assignment about prediction in data mining. and the problem is, i'm new in C# and data mining. i've tried to search an example in sql server site but when i try it into my project it wont worked. an sql exception was made. here is my code
using System;
using Microsoft.AnalysisServices;
using System.Data;
using System.Data.Common;
using System.Data.OleDb;
namespace AMOSampleForDM
{
public Database CreateDatabase(Server srv, string databaseName)
{
Database dbNew = new Database(databaseName, Utils.GetSyntacticallyValidID(databaseName, typeof(Database))) ;
if (srv.Databases.ContainsName(databaseName))
srv.Databases.RemoveAt(srv.Databases.IndexOfName(databaseName));
srv.Databases.Add(dbNew);
dbNew.Update(true);
return dbNew;
}
[STAThread]
static void Main(string[] args)
{
try
{
Server srv = new Server();
srv.Connect("localhost");
Database db = CreateDatabase(srv, "Test");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
and the exception is "make sure that the "sql browser" is running. cannot made a connection because the target machine is actively refused it." i really confused, because i'm make sure that the sql browser and server are running.
could anyone help me with this problem or would you give me another example about data mining in C#???? please i really need your help...
thanks a lot,
angela