The Error appeared 'R-0699539F8F\SQLExpress' stating that "unrecognized escape sequence"
Why this error is there while it is working in
vb.net???
SqlConnection con = new SqlConnection();
con.ConnectionString = "Server=R-0699539F8F\SQLExpress;Initial Catalog=TheBeerHouse;Integrated Security=true";
SqlDataAdapter da2 = new SqlDataAdapter((" select OrderID, AddedBy, AddedDate, ShippingMethod, ShippedDate, Subtotal, Shipping, ShippingFirstName, ShippingLastName, ShippingStreet, ShippingPostalCode, ShippingCity, ShippingState, ShippingCountry, CustomerEmail, CustomerPhone, CustomerFax from tbh_Orders where OrderID = (select Max(OrderID) from tbh_Orders)"), con);
SqlDataAdapter da = new SqlDataAdapter((" Select OrderID, OrderItemID, Title, TitleA, SKU, UnitPrice, Quantity from tbh_OrderItems where OrderID = (select Max(OrderID) from tbh_OrderItems)"), con);
DataSet myds = new DataSet();
da2.Fill(myds, "Orders");
da.Fill(myds, "OrderItems");
DataRelation rel = myds.Relations.Add("MyRelation", myds.Tables[0].Columns["OrderID"], myds.Tables[1].Columns["OrderID"]);
rel.Nested = true;
myds.WriteXml("c:\\NestedXml.xml", XmlWriteMode.IgnoreSchema);