I have a CSV class and I want it to mimic a RecordSet as closely as possible just for ease of use. I originally figured I’d just instantiate a DatabaseField and use the Field() and IdxField() functions as accessors, just like a RecordSet. However, I found while I can instantiate a DatabaseField, I can not assign a value to it. As soon as I do, I get a Bus 10 error. i.e. In a new console project, in the Run event:
Dim d As New DatabaseField
d.StringValue = "xyz"
I am assuming that there is some hidden voodoo inside the C code of the database plugins that is not really exposed to Xojo which doesn’t allow me to instantiate this class from Xojo?
I was originally thinking of that, but then thought that DatabaseField would be more of a match as it would take care of some things such as getting a date value directly from a string inserted as a standard SQL Date/Time. I guess a variant would be a good compromise.
No
Its basically read only UNLESS you’re a plugin but then they literally create a new instance
Subclass one
You can’t create one and assign to it in any useful fashion