View Single Post
  #6 (permalink)  
Old March 2nd, 2009, 04:37 PM
gbianchi gbianchi is offline
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

then change the code! it's not that hard...

change
Code:
if (dr.HasRows() == true)
for
Code:
if (dr.HasRows == true)
and you have to do getvalue(or getstring or getint) inside the loop

Code:
this.label1.text = dr.gettext(dr.getcolumnofset("HomeLeft")
the property is not getcolumnoffset, but is one that return the number of the column based on it's name.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========