Sunday, January 13, 2013

Disconnected architecture in ado.net using C#...




Another way to think about it is that with a disconnected architecture, once you have the data, you could even unplug your computer from the network.  Then do a bunch of queries against the data, sort it, make edits, insert new rows, etc.  Then connect to the network again at a later time and submit the updates.  A disconnected architecture also lets you easily send the data around to other machines.  This approach might be used with a seldomly-connected client, for example.  A DataSet could even be serialized to disk to persist it past power-cycling


        Disconnected  architecture ::the smallest possible code

        SqlConnection conn =
                       new SqlConnection("data source=.;initial catalog=CDAC;integrated security=true;");
        SqlCommand cmd = new SqlCommand("INSERT INTO product(ProductId,ProductName)  values('50','Scrap'')",conn);
        cmd.ExecuteNonQuery();

// the above code is working!!!!



No comments:

Post a Comment

Creating mirror of BST