Replies
Hi Mike,
After much testing and analysis I can give you two additional things to look for if you get a red X on a datagrid. Looks like it wasn't AWS at all. Here is what I found:
1. if you are restoring the appearance of the datagrid from an XML file and that file is corrupted. Sorry, but we didn't save the corrupted xml file for comparison (my bad). But after replacing the XML file with a known good one everything worked fine.
2. we encountered another Red X on the same datagrid but for an entirely different reason. Seems like if you do an sql query in the initializerow of the datagrid, and the sql query fails because of a syntax error, you will get the red X. In InitializeRow we generate a sql query based on the name the user enters into the grid so we can populate some static fields from another table. However, one user put in a single quote as the name (sort of as a placeholder he said) and the single quote embedded into the sql stmt messed it up and it caused the sql stmt to fail and the grid displayed the red X. Replacing the single quote with a dash resolved the issue.
So if any other user experiences a red X, in addition to any possible threading problems, ask them to check these two other possibilities.
Ron
Hi Mike,
Yup, I'm creating and populating the dataset in my app. Nothing fancy going on. Since you confirmed my original thought of "this is happening, but it can't be happening" I'm going to now pursue this with Amazon. Everything points to them. I'll let you know what I find out as it might help somebody with a similar issue in the future.
Ron
Hi Mike,
One more thing… The program is actually running on a terminal server at Amazon Web Services as well as accessing the sql server database on their servers. Could it be possible that their server is "forcing" my application into separate parallel threads without me knowing about it, and could that be the issue??? Just trying to think outside the box on this one…
Ron
Hi Mike,
Still a little confused about this threading. The application is multi user with a sql server database. When a user loads a form, the dataadapter.fill is used to load a dataset. the datagrid is then bound to the table in the dataset. When finished the data is written back to the database with a dataadapter.update. As I understand it, the datagrid is using a local data source (the dataset), so I'm not sure where threading comes into play. I don't spawn any threads in the program.
In addition to never happening except in this amazon cloud database, this red X issue is only affecting one datagrid. I use datagrids all over the application and each one is bound the same way to a table in a dataset.
Could this be some sort of sql server setting? Thanks for any additional insight you might provide.
Ron
Hi Mike,
Still a little unsure of what is going on. Basically this is a multi user application with a sql server database. When a form is loaded the user does a dataadapter.fill into his dataset. the datagrid is then bound to the table in the dataset. When user is done, I grab a semefore to ensure I'm the only one updating the database and then do a dataadapter.update.
I'm thinking that this means that the datagrid is getting its data from the local dataset. I don't spawn off any additional threads in the program, so I can't imagine where this threading is coming from, and have no idea where to look. Any suggestions you might have as to where to look from here?
Ron