Tuesday, November 27, 2007

Oracle Find or Counts Number Of Row(s) And Column(s) In A Table

select count(*) from TableName // To Count The Number of Row(s) in a Particular table

Ex: Select Count(*) from emp;

select count(*) from user_tab_columns where table_name='TABLENAME';

// To Count The Number of Column(s) in a Particular table,

Note :TABLENAME Should be UPPERCASE Letter

Ex: Select  count(*) from user_tab_columns where table_name = 'EMP'

Friday, November 2, 2007

Dynamically Writing into Web.config File

    XmlDocument xDoc = new XmlDocument(); // Gobal Declaration
string Path; // Gobal Declaration
int i; // Gobal Declaration
protected void Page_Load(object sender, EventArgs e)
i = Convert.ToInt32(ConfigurationManager.AppSettings["Test"].ToString());
protected void bt1_Click(object sender, EventArgs e)
Path = Server.MapPath("~/web.config");
XmlNodeList NodeList = xDoc.GetElementsByTagName("appSettings");
XmlNodeList tNodeList = NodeList[0].ChildNodes;
XmlAttributeCollection xAttColl = tNodeList[0].Attributes;
xAttColl[0].InnerXml = "Test";
xAttColl[1].InnerXml = Convert.ToString(i + 1);




<add key="Test" value="0" /> <!-- Add This In Your WebConfig File -->