Link to home
Start Free TrialLog in
Avatar of mSchmidt
mSchmidt

asked on

Updating a Table on a remote server using a Dataset, cant get it working

This is the code iam trying to get to copy all data from one table and insert it in a remote server.

The data is filled into the dData dataSet just fine.. and the MessageBox pops up to .. however no data is written..

                SqlConnection sCnxn = new SqlConnection("server=195.69.130.88\\SQLEXPRESS,1434;database=tasklist;uid=sa;pwd=x7xvlwv1;");
                sCnxn.Open();
                DataSet dData = new DataSet();
                SqlCeDataAdapter aDBs=new SqlCeDataAdapter("Select * from phoneLog", cnxn);
                aDBs.Fill(dData);
                SqlDataAdapter bDBs = new SqlDataAdapter("select * from phoneLog",sCnxn);
                bDBs.Update(dData);
                MessageBox.Show("Sync completed");

Can someone tell me what iam doing wrong ?
ASKER CERTIFIED SOLUTION
Avatar of lakshman_ce
lakshman_ce

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial