No row at position 0 ??? Please help !!!

G

Guest

Hi,I have copied over a VB NET project to 2 people's machine and tried to run
it. (We are all on windows XP). I can run the exe ok on one machine. On the
second one, it still runs, but I get a message 'No row at position 0' when I
start the program. Why would that happen ?

What does it mean anyway ? I could not find any help anywhere.

I am indeed working with an empty datatable, datagrid, CurrencyManager and
DataGridTableStyle. If that is the problem, why don't I get the message on
my and other person's machine ?

I guess I have 2 questions. Why does the message appear only on the third
machine and How can I get rid of it ?

Thanks
 
G

Guest

Hi,

Are you trying to access row of some dataset. Something like:
myDataset.Tables[0].Rows[0];

If that's the case try doing:
if(myDataset.Tables[0].Rows.Count != 0)
{ row = myDataset.Tables[0].Rows[0];}

From where are you trying to populate Datagrid, That might have already
been set on your machine and not on third person machin.

Animesh
 
G

Guest

Hi Marie!!

Can you please show me the code where this happen? From the looks of it, you
are trying to read data either from a datareader or from a datatable's rows
collection. The problem is that there is no row at the provided index...

That is why the exception is thrown.

if you want to mail me the code, then please do so and I will try to help you.

kind regards
Henrik
 

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

Top