oh evil, what yah doing.
use
$productM = VmModel::getModel('product');
$productM->store($mDataArray);
Use an array with the data and the system is doing the rest for you.
or use the xref table directly
$data= array('virtuemart_product_id'=>array(1,2,3))
$table = $productM->getTable('product_categories');
$table->bindChecknStore($data);
This is just out of the head, not tested or something, but to give you an idea.