我使用此Web方法创建了Web服务:
public void Add( string kurs11, string aktivnost11, string godina11, string mesec11, string dan11, string sat11, string brst11)
{
AdomdConnection cn = new AdomdConnection("location=localhost;Initial Catalog=MZ");
AdomdCommand cmd = new AdomdCommand();
cmd.Connection = cn;
cmd.CommandText = "SELECT t.*,Predict ([Modul]) as [Modul] From [Ph D] NATURAL PREDICTION JOIN (SELECT @kurs as [Id Kursa], @aktivnost as [Aktivnost], @godina as [Godina], @mesec as [Mesec],@dan as [Dan ime],@sat as [Sat],@brst as [Broj Studenata]) AS t ";
AdomdParameter kurs1;
kurs1 = cmd.CreateParameter();
kurs1.Direction = ParameterDirection.Input;
kurs1.ParameterName = "kurs";
cmd.Parameters.Add(kurs1);
cmd.Parameters["kurs"].Value = kurs11;
AdomdParameter aktivnost1;
aktivnost1 = cmd.CreateParameter();
aktivnost1.Direction = ParameterDirection.Input;
aktivnost1.ParameterName = "aktivnost";
cmd.Parameters.Add(aktivnost1);
cmd.Parameters["aktivnost"].Value = aktivnost11;
AdomdParameter godina1;
godina1 = cmd.CreateParameter();
godina1.Direction = ParameterDirection.Input;
godina1.ParameterName = "godina";
cmd.Parameters.Add(godina1);
cmd.Parameters["godina"].Value = godina11;
AdomdParameter mesec1;
mesec1 = cmd.CreateParameter();
mesec1.Direction = ParameterDirection.Input;
mesec1.ParameterName = "mesec";
cmd.Parameters.Add(mesec1);
cmd.Parameters["mesec"].Value = mesec11;
AdomdParameter dan1;
dan1 = cmd.CreateParameter();
dan1.Direction = ParameterDirection.Input;
dan1.ParameterName = "dan";
cmd.Parameters.Add(dan1);
cmd.Parameters["dan"].Value = dan11;
AdomdParameter sat1;
sat1 = cmd.CreateParameter();
sat1.Direction = ParameterDirection.Input;
sat1.ParameterName = "sat";
cmd.Parameters.Add(sat1);
cmd.Parameters["sat"].Value = sat11;
AdomdParameter brst1;
brst1 = cmd.CreateParameter();
brst1.Direction = ParameterDirection.Input;
brst1.ParameterName = "brst";
cmd.Parameters.Add(brst1);
cmd.Parameters["brst"].Value = brst11;
cn.Open();
AdomdDataReader reader = cmd.ExecuteReader();
}
但是,当我调用这个方法时,我得到空页。我怎样才能看到结果? 此查询返回表中的结果,例如像
kurs aktivost godina mesec dan sat brst modul
1 edit 2013 2 Friday 12 75 forum