'tiger' senthil kumar


{ City } chennai
< Country > india
* Profession * software engineer
User No # 5233
Total Questions Posted # 0
Total Answers Posted # 54

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 1146
Users Marked my Answers as Wrong # 320
Answers / { 'tiger' senthil kumar }

Question { 9263 }

reading doc file in textbox using .net2005 with c#


Answer

We can use the files concept to load the doc file content
into the textbox using the Multiline property.

we have many ways.This is one of the way.

using System.IO;


FileStream fstream = new
FileStream("Sample.doc",FileMode.Open,FileAccess.Read);
StreamReader sreader = new StreamReader(fstream);

txtFileContent.Text = sreader.ReadToEnd();


->change your Text Box Property into tghe multilien txtbox.

Is This Answer Correct ?    5 Yes 16 No

Question { IBM, 19551 }

write a query for the fifth highest salary?


Answer

Hi, friends This one is working fine. I have tested.

SELECT TOP 1 t.esal
from
(
select top 5 esal from employee order by esal desc
) t
order by t.esal asc

Is This Answer Correct ?    9 Yes 6 No


Question { HP, 45350 }

What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table


Answer

Both are returns the SAME results.

I dont know the meaning of the
SELECT * FROM Table_Name WHERE 1=1
SELECT * FROM Table_Name WHERE 2=2
SELECT * FROM Table_Name WHERE 5=5
SELECT * FROM Table_Name WHERE 100=100
.
.
.
etc..,

It accepts the where both are equal.

If you give like

SELECT * FROM Table_Name WHERE 100=1001
It is not accept.

Is This Answer Correct ?    34 Yes 1 No

Question { Infosys, 67605 }

Write a query to delete duplicate records in SQL SERVER


Answer

Hi friends, please just try out this. This works fine for me.

We have lot of methods to do this. But using temp table,
drop the original table,retain the temp as orinial is not a
good pratice.

When u have large no of data it will affect ur performance.


DELETE FROM employee WHERE((SELECT eid,COUNT(eid) FROM
employee GROUP BY eid) > 1)

Is This Answer Correct ?    15 Yes 46 No

Question { 4313 }

How to handle error while project running on live


Answer

Its very essential to track the error in the live server.
When end user use the project, some error may come on live
server. We can use the an email id to capture them in the
exception block and sends them email.

try
{
----
----
----
}
catch(Exception oEx)
{
MailMessage oMM = new MailMessage();
oMM.To ="skumaar_mca@yahoo.com";
oMM.Subject = oEx.ToString();
StringBuilder oSB = new StringBuilder();
oSB.Append("Browser:"+Request.Browser);
oSB.Append("Url:"+Request.Url);
oSB.Append("IP Address:"+Request.UserHostAddress);
oSB.Append("Error:"+oEx.Message());
oMM.Body = oSB.ToString();
SmtpClient.Send(oMM);

This is sample coding for how to capture in the liver server.

No need to the write the above piece of coding in the every
place.

Just create an project and put the code in that class.
We can use the error message to that class and we can send
the email from there.


}

Is This Answer Correct ?    4 Yes 0 No

Question { Techno Labs, 16367 }

Can we inherit a private class in chsarp? how? explain(with
code) ?


Answer

Private class cannot inherit be inherited in the derived class.

Is This Answer Correct ?    17 Yes 1 No

Question { 6613 }

How to send auto matic emails based on scheduled tasks to
several of my clients


Answer

we can achieve this either in the windows application with
the windows schedule task or sql server 2005.

Is This Answer Correct ?    1 Yes 1 No

Question { 7009 }

FetCh Records No 5 to 10 From Dataset


Answer

DataSet supports to recieve the specfic row with the
starting rows and ending rows.

SqlDataAdapter.Fil;(DataSet,"Sample",StartingRecord,EndingRecord);

Is This Answer Correct ?    1 Yes 2 No

Question { NIIT, 18862 }

Can a master page inherit another master page?


Answer

yes we can. I have implemented in my project.

Is This Answer Correct ?    12 Yes 0 No

Prev    1   2   3    [4]