April 1, 2008
Take some example that some data base updations will be done through one of your screen in the project. To know what are the Sql server tables will be effected when doing some thing in that screen…………………….
Make sure that dabase will be on local machine….
Open Sql Profiler of Sql Server……………….
Go File –> New –> Trace
Then Trace Properties screen will appears and asks to give trace name. Give what ever name you like..
Click Run Button….
Now go for your project screen and click any button which will update or modify database. All the transactions will be loaded in the Trace of sql profiler.
means what are the queries executed when you clicked that button , which stored procedures executed………etc….
Gives a sample view that what are the tables effected when click a button of a screen in the project.
Leave a Comment » |
Sql Tip |
Permalink
Posted by kamalraaja
April 1, 2008
when working with excel work books please use some standard to read data from excel sheet….
1.Create object for Excel Application
2. Create object for Excel Workbooks
3. Create object for ExcelWorkbook
4.Create object for ExcelWorkSheet
when using Excel 2000 component
{
Excel.Application xla = new Excel.Application();
Excel.Workbooks xlwbs = xla.Workbooks;
Excle.Workbook xlwb; Excel.Worksheet xls;
xlwb=xlwbs.Open(“[ExcelFileName]“, 0, false, 5, “”, “”, true, Excel.XlPlatform.xlWindows, “\t”, false, false, 0, true); xls=(Excel.Worksheet)xlwb.Worksheets["ExcleSheetname"];
}
Read necessary data from excel work sheet and after completion of working with
excel then release objects in which manner they are created…
so
{
ReleaseComObject(xls);
xlwb.close(false,null,null);
ReleaseComObject(xlwb);
xlwbs.Close();
ReleaseComObject(xlwbs);
xla.Quit();
ReleaseComObject(xla);
Gc.Collect();
}
private void ReleaseComObject(object o)
{
try
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(o);
}
catch (Exception ex){ }
finally { o = null;}
}
Leave a Comment » |
c#.net |
Permalink
Posted by kamalraaja