The long and the short of it, for Drupal 6 - use content_insert(), which should be fired anyway but isn't. See
node_save() with CCK fields for more details. drupal_execute() is too robust for me - I just needed to import a SQL Server table with 4500+ rows quickly. Sample code after the jump, using parsecsv for PHP.
<?php include_once('./includes/bootstrap.inc'); include_once('./includes/form.inc'); include_once('./modules/node/content_types.inc'); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); bootstrap_invoke_all('init'); ini_set('memory_limit', '512M'); user_authenticate('user','password'); require_once('/home/mmatienzo/parsecsv.lib.php'); $csv = new parseCSV(); $csv->auto('/home/mmatienzo/manu_collections.uniq.csv'); module_load_include('inc', 'node', 'node.pages'); $i = 0; //print_r($csv->data); foreach ($csv->data as $row) { $node = new stdClass(); #$node = array('type'=>'amatimport'); $form_state = array(); $node->type = 'amatimport'; $node->title = $row['ManuscriptTitle']; //$node->name = 'mmatienzo'; $node->language = 'en'; //$node->uid = '1'; $node->field_arms_amat_id[0]['value'] = $row['Id']; $node->field_arms_findingaids[0]['value'] = $row['FindingAids']; $node->field_arms_amat_printfindingaid[0]['value'] = $row['PrintFindingAid']; $node->field_arms_catnyp_old[0]['value'] = $row['CatnypLink']; $node->field_arms_amat_project_link[0]['value'] = $row['ProjectLink']; $node->field_arms_amat_seealso[0]['value'] = $row['SeeAlso']; $node->field_arms_closed['value'] = $row['Closed']; $node->field_arms_amat_location[0]['value'] = $row['Location']; $node->field_arms_sgmcatnyp[0]['value'] = $row['SgmCatnyp']; $node->field_arms_sgmead[0]['value'] = $row['SgmEad']; $node->field_arms_seeref[0]['value'] = $row['SeeRef']; $node->field_arms_creator[0]['value'] = $row['ManuscriptAuthor']; $node->field_arms_mssdbid[0]['value'] = $row['MSS_ID']; $node->op = t('Save'); if ($row['Wilson'] = 'TRUE') { $wilson = 1; } else { $wilson = 0; } $node->field_arms_amat_wilson['value'] = $wilson; content_presave($node); node_save($node); content_insert($node); $i++; print $i . '<br/>'; #break; ?>