I tried the databinding capability of ganttview, and during our testing, we tried to add thousands of rows, and to our surprise, the next time we load the data, it displays an error "System.NullReferenceException: Object reference not set to an instance of an object at....., please see attached image.
Thanks
Hi,
I tried this and it always works fine for me, so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.
Please see attached project file.
Hello LSG,
I have found that the NullReferenceException does not promt up when I eliminate any possibility of selecting null values from the database. I did so by writing a query as well as updating your data adapter in your button. Please see below.
da = New SqlDataAdapter("SELECT * FROM tblProjectTasks WHERE MASTER_ID = 'd5392ed5-a4c5-4aa4-b06c-a0d685e0552b' And TaskCode is not Null ORDER BY SEQNO", cn)
Let me know if you have any questions. Does this display the correct data?
Hello,
I have tried your suggestion, I updated the database from null values, and updated my query to follow your suggestion but still gives me the same error.
Please see attached DBSample.rar for the database.
Can you send me the updated .mdf file as well? So far I only swapped your updated project's sql references to your .mdf dbo that I have currently stored in my local SQL server. Everything ran the same with no issues. By retrieving your database instead of running your query will prevent any issues testing.
I sent the SQL script together the updated project file. Can you please verify. Thanks
I am still investigating this issue. I reproduced the issue by creating a local database with tblProjectTasks and tblProjectMaster with only 1 task. The TaskCode had a value, so I am not sure what can and can't be null.
Please let me know if you have any questions or concerns.
Please see attached DB Script file.
Yes, I only received the SQL script and your updated project file. I see that you removed all the insert statements in the SQL query, has anything else been altered?