Active Directory Web Service Question. RRS feed

  • Question

  • I don't know if this is the right forum but here it goes my question and problem.



    I am building a web service that will check for the employee information in a database and then by the employeeId it will check in Active Directory and update the employee information. The match for the employee will be by the employeeId object from active directory and the database. The information to be update in AD is mostly phone numbers.


    I already got the data coming from AD and from the DB that has all the employee information updated.



        #region Connection
            public string connString = "Server=server1;uid=access;pwd=password;Database=database;Integrated Security=True";

           //Data from view in DB, the data from this table join has the data that needs to update AD
            #region GetXEmps
            [WebMethod(Description = "Get Employees From TABLE A and TABLE B")]
            public DataSet GetXCEmps() {
                SqlConnection xConn = new SqlConnection(connString);
                DataSet xDS = new DataSet();
                SqlDataAdapter xAdapter = new SqlDataAdapter("Select * From view__join", xConn); //This is a join from 2 tables from different databases that contains the current information.           
                xAdapter.Fill(xDS, "view_join");           
                return xDS;


    //I created a view to get the employees from active directory

            #region Employees from Active Directory
            [WebMethod(Description = "Get Employees from Active Directory")]
            public DataSet GetADEmps() {
                SqlConnection aConn = new SqlConnection(connString);
                DataSet adDS = new DataSet();
                SqlDataAdapter adAdapater = new SqlDataAdapter();
                adAdapater.SelectCommand = new SqlCommand("Select * From view_ActiveDirectory", aConn);
                adAdapater.Fill(adDS, "view_ActiveDirectory");
                return adDS;


    My Question.


    How can I get the employeeId from the view that has the data and match that employeeId in Active Directory to update the information? This will be done by using the employeeId object from AD and the employeeId key from the database table.


    I am very new working with active directory and web services, so I try to explain in very detail everything.


    Any help will be very appreciated.



    Friday, April 25, 2008 2:15 PM


All replies