Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
GeneralRe: how can i find number of days in a given year and month Pin
Ahmed Khallaf2-Jun-09 3:10
Ahmed Khallaf2-Jun-09 3:10 
QuestionHow to draw a pdf or postscript files to a graphics object Pin
MarkPhB1-Jun-09 21:05
MarkPhB1-Jun-09 21:05 
QuestionHow to paint a portion of IE window until it gets fully loaded with the requested URL? Pin
svt gdwl1-Jun-09 21:04
svt gdwl1-Jun-09 21:04 
QuestionProject deployment Pin
KIDYA1-Jun-09 21:01
KIDYA1-Jun-09 21:01 
AnswerRe: Project deployment Pin
Vimalsoft(Pty) Ltd1-Jun-09 21:08
professionalVimalsoft(Pty) Ltd1-Jun-09 21:08 
QuestionPerl & c#.net Pin
balu123451-Jun-09 20:44
balu123451-Jun-09 20:44 
QuestionRe: Perl & c#.net Pin
monstale1-Jun-09 20:58
monstale1-Jun-09 20:58 
QuestionHow to change Connection string at runtime for window application while using Linq to Sql Pin
Sanket.Patil1-Jun-09 20:40
Sanket.Patil1-Jun-09 20:40 
AnswerRe: How to change Connection string at runtime for window application while using Linq to Sql Pin
Henry Minute2-Jun-09 2:16
Henry Minute2-Jun-09 2:16 
QuestionError:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
KIDYA1-Jun-09 20:19
KIDYA1-Jun-09 20:19 
AnswerRe: Error:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
Christian Graus1-Jun-09 20:27
protectorChristian Graus1-Jun-09 20:27 
GeneralRe: Error:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
Member 367560429-Nov-10 17:50
Member 367560429-Nov-10 17:50 
AnswerRe: Error:Project Properties/Resources: There is already another resource with the name 'Project1'. Pin
Member 435337124-Mar-14 16:32
Member 435337124-Mar-14 16:32 
Questionproblem of reports using in visual studio [modified] Pin
seeramzanse1-Jun-09 19:57
seeramzanse1-Jun-09 19:57 
AnswerRe: pleas help me urgently in the problem of reports using in visual studio Pin
Christian Graus1-Jun-09 20:11
protectorChristian Graus1-Jun-09 20:11 
GeneralRe: pleas help me urgently in the problem of reports using in visual studio Pin
seeramzanse1-Jun-09 20:18
seeramzanse1-Jun-09 20:18 
GeneralRe: pleas help me urgently in the problem of reports using in visual studio Pin
Christian Graus1-Jun-09 20:19
protectorChristian Graus1-Jun-09 20:19 
Question[Message Deleted] Pin
seeramzanse1-Jun-09 20:32
seeramzanse1-Jun-09 20:32 
AnswerRe: pleas help me urgently in the problem of reports using in visual studio Pin
Christian Graus1-Jun-09 20:35
protectorChristian Graus1-Jun-09 20:35 
GeneralRe: pleas help me urgently in the problem of reports using in visual studio Pin
seeramzanse1-Jun-09 20:39
seeramzanse1-Jun-09 20:39 
GeneralRe: pleas help me urgently in the problem of reports using in visual studio Pin
Rajesh R Subramanian1-Jun-09 21:35
professionalRajesh R Subramanian1-Jun-09 21:35 
AnswerRe: pleas help me urgently in the problem of reports using in visual studio Pin
Colin Angus Mackay1-Jun-09 20:54
Colin Angus Mackay1-Jun-09 20:54 
QuestionHow to implement IDocHostUIHandler Interface in c#? Pin
svt gdwl1-Jun-09 19:53
svt gdwl1-Jun-09 19:53 
QuestionMDI Application. Pin
vinay_K1-Jun-09 19:45
vinay_K1-Jun-09 19:45 
QuestionError: Unable to cast object of type 'System.DateTime' to type 'System.String'. Pin
KIDYA1-Jun-09 18:41
KIDYA1-Jun-09 18:41 
Hello experts,

I got above error,I am trying to do reading data from sql and write it into csv file format.However when it read data row by row from sql then gives above error.
My code is:
<pre> while (dr.Read())
{
strRow = "";
for (int i = 0; i < dr.FieldCount; i++)
{
strRow += (string)dr.GetString(i); // Gives error here

if (i < dr.FieldCount - 1)
{
strRow += this.separator;
}
}
sw.WriteLine(strRow);
}

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.