Last post Nov 16, 2010 10:04 AM by bladerunner148
Nov 15, 2010 11:31 AM|bladerunner148|LINK
There are two web applications (C#) located in two different web servers. Each app has a Dealer Dropdownlist that binds the dealerid and dealername. Currently, the Dealer table is in two sql servers. Since its tough to maintain two tables everytime there
is an update, is it possible to use a web service call to use the same source for these apps? I am not sure if a web service call would be the right way to do this?
The Dealer Information is displayed in a grid in a web page. I have access to this page. Is it possible to this page to get the dealerid and dealer name and then bind this to the two dropdowns in the applications?
I can't connect the sql server in the applications due to permissions issue. So, I have to find other ways to make this happen. Any advise would be greatly appreciated. Thanks!!
Nov 15, 2010 02:45 PM|bladerunner148|LINK
I was looking into ADO.Net Data Services..here is what i have come so far. But how would i pass this dataset GetCenterIDList() to the DataService?
public class CenterData : DataService<DataSet>
// This method is called only once to initialize service-wide policies.
public static void InitializeService(IDataServiceConfiguration config)
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
public DataSet GetCenterIDList()
string insertsql = "SELECT CenterId + '-' + CenterName As CenterDesc, CenterId FROM [center] ORDER BY CAST(CenterId As int)";
string conn = ConfigurationManager.ConnectionStrings["ListCountConnection"].ConnectionString;
SqlConnection scon = new SqlConnection(conn);
SqlCommand scmd = new SqlCommand(insertsql, scon);
SqlDataAdapter sda = new SqlDataAdapter();
sda.SelectCommand = scmd;
DataSet ds = new DataSet();
Nov 16, 2010 10:04 AM|bladerunner148|LINK
Sorry, I wasn't sure what to use in order to get my task done. After doing some research, i found web service call the better way to do this. It was much easier to do this using webservices. I had never used webservices before. Glad I was able to implement
that on my project..