Need help - Console.WriteLine(rdr[0]);

  • Thread starter Thread starter Learner
  • Start date Start date
L

Learner

Hello,

I am using Visual Studion.net 2003 to run and test a small program
that supposed to be tested in a word document. I got the connection
and using a data reader to read the data. It executes fine but I don't
see the results in command prompt beacuase I use VS.net 2003 to run
the program.

while (rdr.Read())
{
Console.WriteLine(rdr[0]);
}

Is there a place where I can see these results printed in the IDE? If
I will have to modify the above print line please advice how should I
do that.

thanks
-L
 
Learner said:
Hello,

I am using Visual Studion.net 2003 to run and test a small program
that supposed to be tested in a word document. I got the connection
and using a data reader to read the data. It executes fine but I don't
see the results in command prompt beacuase I use VS.net 2003 to run
the program.

while (rdr.Read())
{
Console.WriteLine(rdr[0]);
}

Is there a place where I can see these results printed in the IDE? If
I will have to modify the above print line please advice how should I
do that.

You could use Debug.WriteLine instead if compiled with debug.
 
Learner said:
I am using Visual Studion.net 2003 to run and test a small program
that supposed to be tested in a word document. I got the connection
and using a data reader to read the data. It executes fine but I don't
see the results in command prompt beacuase I use VS.net 2003 to run
the program.

while (rdr.Read())
{
Console.WriteLine(rdr[0]);
}

Is there a place where I can see these results printed in the IDE? If
I will have to modify the above print line please advice how should I
do that.

What kind of application is it? If it's a console application, you
should get a console window up when you run it.
 
Learner said:
I am using Visual Studion.net 2003 to run and test a small program
that supposed to be tested in a word document. I got the connection
and using a data reader to read the data. It executes fine but I don't
see the results in command prompt beacuase I use VS.net 2003 to run
the program.

while (rdr.Read())
{
Console.WriteLine(rdr[0]);
}

Is there a place where I can see these results printed in the IDE? If
I will have to modify the above print line please advice how should I
do that.

Try put a:

Console.ReadLine();

at the bottom of your Main.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top