Code Snippet posted by:
Srilu.Nayini577 | Posted on: 8/14/2012 | Category:
Others Codes | Views: 385 | Status:
[Member] |
Points: 40
|
Alert Moderator
using system.Data;
using System.Data.SqlClient ;
[WebMethod]
public DataSet GetEmpData()
{
sqlconnection con=new sqlconnection("Data Source=serverName;User Id=id;password=password;Initial Catalog=DataBaseName");
sqlDataAdapter da=new sqlDataAdapter("select * from Emp",con);
DataSet ds=new DataSet();
da.Fill(ds,"a");
return ds;
}
SRILATHA
.Net Developer
Found interesting? Add this to: