Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Argh,

I have an application with a datagrid in it, and it displays some parts ...

 

so, i crated a routine that after it's deleted it submits the datagrid through the dataadapter to the db..everything is hunky dory..

 

EXCEPT WHEN I run the applicaiton on any computer that does NOT have vs.studio.net installed on it..then i get an error that says

 

'deleted row information cannot be accesed through the row.'

 

EVERY other aspect of the app works like a charm on these other machines.. I don't get it..please help ..there are 40 plus people here waiting on this and they are DRIVING ME NUTS!!

 

peace mel

Posted (edited)

Yes I have....It has to be something about the number system of the other machines...

 

or mdac maybe? argh i don't know it's killing me. the users are about to stone me to death.

Edited by melegant
Posted

I did a quick search on that error message and one common cause is the database ID in the DataGrid doesn't match the ID in the database.

 

Is there any way this could happen due to the way you have set connections up (grasping abit I know) but... or something really does happen with certain data have you tried keying in exactly the same on your machine as the user's machine

Posted

Well, I have finally found a pattern but still not a real answer..close now..ever close.

 

A quick bit on the datagrid i have..its a part list , with prices, discounts, descriptions and model #'s.

 

Now, the submit routine i have basically sends grids datasouce, which is a datatable, through the dataadpater as an update and then i refresh the grid. (have to actually set the datasource = nothing first to clear it but anyway)

 

I have discovered that on the machines where it does not work (Row deletion that is)

if i first make a change to a field in the datatable and send the update, THEN i can delete rows ok.

 

I am not sure what this means...excepet that i am a step closer!

Posted

Eureka! I figured out what the problem was...

 

it's funny when solutions present themselves..i had just gotten home from work, i was preparing to go out to the city , washing my hands thinking about who would be the next american idol, when it hit me...

 

I wasn't calling the sql adapters schema fill method when i loaded the grid..

i called it right before the update (need to to use the command builder) but not on the form load..

 

and sure enough it worked. i have no idea why it works on my VS pc's without doing this but i suspect it might have something to do with the fact that i have sql server stuff installeD? not sure but hey it worked.

 

the post about the id not matching the primary key clued me in!

 

thanks!

mel

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...