types dataset
hi,
i creating project using typed dataset first time.
the datatier returns dataset of .xsd type webservice
//dsemps .xsd
public dsemps getdata()
{
string strsql = "select employeeid, lastname, firstname, title, titleofcourtesy, birthdate, hiredate, address, city, region, postalcode, country, homephone, extension, photo, notes, reportsto, photopath employees";
string strconn = "server=localhost;" + "database=northwind;" + "integrated security=sspi;connect timeout=5";
dsemps dsdata = new dsemps();
using(sqldataadapter oda = new sqldataadapter(strsql, strconn))
{
oda.fill(dsdata, "employees");
return dsdata;
}
}
here if use dataset below:
placing dot after dataset (i.e. dsdata) shows employees table , placing dot shows field names...
this far. problem in webservice returned dataset below, can not column names after dadata.employees.
//empdata datatier...
public empdata.dsemps getdata()
{
try
{
empdata.employees dc = new empdata.employees();
return dc.getdata();
}
catch
{
throw;
}
}
can see why case?
thanks
Archived Forums A-B > ASMX Web Services and XML Serialization
Comments
Post a Comment