Using COM class and VB Dll with LET property

I have this code in VB:
Public Property Let ccField(ByVal fldName As String, newVal As Variant)
fldData = tableSpecs.Item(fldName) 'note - bad fldname will error
Call insertToBuf(fldData, newVal, dataBuf())
End Property

Using the com_print_typeinfo I get:
/* DISPID=1745027088 */
/* VT_VARIANT [12] */
var $ccField;

/* DISPID=1745027088 */
var $ccField;

I have tried:
foreach ($this->_record as $key=>$value) {
$temp = $value->getValueForDB2();
$this->_table->ccField($key, $temp); //<- a vb let property
}

With this result:
<b>Fatal error</b>: Uncaught exception 'com_exception' with message 'Error Invalid number of parameters.' in C:\Inetpub\wwwroot\WA422\Testing\BtrieveRecord.php:104

Then I tried:
foreach ($this->_record as $key=>$value) {
$temp = $value->getValueForDB2();
$this->_table->ccField($key) = $temp;
}

With this result:
<b>Fatal error</b>: Can't use method return value in write context in <b>C:\Inetpub\wwwroot\WA422\Testing\BtrieveRecord.php</b> on line <b>104</b>

And I've tried:
foreach ($this->_record as $key=>$value) {
$temp = $value->getValueForDB();
$this->_table->ccField[$key] = $temp;
}

With this result:
<b>Fatal error</b>: Uncaught exception 'com_exception' with message 'Error Parameter not optional.' in C:\Inetpub\wwwroot\WA422\Testing\BtrieveRecord.php:104

Any ideas would be greatly appreciated.
 
Back
Top