Datagrid Question..(and woes)

melegant

Well-known member
Joined
Feb 2, 2003
Messages
52
Location
NY
Argh,
I have an application with a datagrid in it, and it displays some parts ...

so, i crated a routine that after its 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 dont get it..please help ..there are 40 plus people here waiting on this and they are DRIVING ME NUTS!!

peace mel
 
Yes, 1.1...EVERYTHING else works with the datagrid, updating, adding etc..only when I try to delete the row ):
 
Yes I have....It has to be something about the number system of the other machines...

or mdac maybe? argh i dont know its killing me. the users are about to stone me to death.
 
Last edited by a moderator:
I did a quick search on that error message and one common cause is the database ID in the DataGrid doesnt 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 users machine
 
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!
 
Eureka! I figured out what the problem was...

its 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 wasnt 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 pcs 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
 
Back
Top