Black Locust Software

Technology Solutions for Business

ADO error 3420 (-2146824868)
"Object is no longer valid" in TrueGrid




TrueGrid 7, running under VB6 was coming up with this error. As it turned out, we had a droplist powered by an ADO data control. This data control's recordsource was being changed from looking at table1 to table2 and back.
That is, in one event it had dta1.Recordsource = "Select field1, field2 from table1" and in another it was selecting from table2.


In a later incident, we found we were assigning to a TrueGrid column's Value property, not its Text property. The Text property seems more forgiving of formatting junk ... or something. Changing to Text solved that one.


Don't know if that would be the same problem you are having, but I hope this is some help in solving it.

dwilson
cover
Serious ADO: Universal Data Access with Visual Basic
.
cover
Bug Proofing Visual Basic: A Guide to Error Handling and Prevention