Error in DBGrid

Error in DBGrid

The documentation for the DBGrid in VB4’s Professional and EnterpriseEditions states that the control’s Text and Value properties allow youto read or set the contents of a cell. This would seem to indicate thatyou could use these properties to update a field in a record set to whichthe grid is bound. Unfortunately, that is not the case. The following codegenerates runtime error 438: “Object doesn’t support this propertyor method:”

 ' This doesn't work:DBGrid.Columns(0).Text = "Hello, world."' Neither does this:DBGrid.Columns(0).Value = "This is a test"

The workaround is to update the data control’s record set directly.The change will be reflected automatically in the bound grid:

 datCtl.Recordset.EditdatCtl.Recordset.Fields(0) = "This is a test"datCtl.Recordset.Update
Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved