DECLARE @TABLENAME VARCHAR(50)
SET @TABLENAME='<TableName>' --Pass the Table Name here
SELECT @TableName as [Table Name],A.Name AS [SP Name],B.Text as [SP Text]
from SYSOBJECTS A
INNER JOIN SYSCOMMENTS B
ON A.ID=B.ID
WHERE B.TEXT LIKE '%'+@TableName+'%'
and A.TYPE='P'
Monday, 19 April 2010
Monday, 8 March 2010
Dynamic Columns
DataTable dtbl1 = new DataTable();
dtbl1=c1.FetchRecords("items");
dngrview.DataSource = null;
dngrview.DataBind();
DataTable dt = new DataTable();
for (int i = 0; i <= dtbl1.Rows.Count-1; i++)
{
DataColumn dc = new DataColumn(dtbl1.Rows[i]["ItemName"].ToString() , typeof(System.Int32));
dt.Columns.Add(dc);
}
DataRow dr = dt.NewRow();
dt.Rows.Add(dr);
dngrview.DataSource = dt;
dngrview.DataBind();
dtbl1=c1.FetchRecords("items");
dngrview.DataSource = null;
dngrview.DataBind();
DataTable dt = new DataTable();
for (int i = 0; i <= dtbl1.Rows.Count-1; i++)
{
DataColumn dc = new DataColumn(dtbl1.Rows[i]["ItemName"].ToString() , typeof(System.Int32));
dt.Columns.Add(dc);
}
DataRow dr = dt.NewRow();
dt.Rows.Add(dr);
dngrview.DataSource = dt;
dngrview.DataBind();
Subscribe to:
Posts (Atom)