Programatically upload a page in D7 I'm certainly a noob, so sorry for this if it's very basic.

I had an installation of D6 and the following code was working perfectly. But when I upgraded to D7, the page was posted, but the body wasn't being uploaded. I see that the location of the body has changed in the MySQL structure, but how do I address it in the code? Here's what was working in D6:

    $node-&gt;name = rand();
$node-&gt;title = $content-&gt;title;
$node-&gt;created = time();
$node-&gt;status = 1; //published
$node-&gt;promote = 0;
$node-&gt;sticky = 0;
$node-&gt;body = $content-&gt;data;
$node-&gt;type = 'page';
//$node-&gt;path = $content-&gt;path;
$node-&gt;revision = 'true';
node_save($node);


Interestingly, when I try to specify the path, the node_save returns an error, but when I specify body, it fires, but the body never shows up.

Can anyone help? I've spent a lot of time on this... much appreciated.
&lt;?php
//Create node
    $node = new StdClass();
    $node-&gt;type = 'game';
    $node-&gt;title = t('@date-@time', array('@date' =&gt; format_date($om__result-&gt;date, 'short'), '@time' =&gt; format_date($om__result-&gt;time, 'custom', "h:i A")));

    //Date
    $node-&gt;field_date = array(
      0 =&gt; array(
        'value' =&gt; format_date($om__result-&gt;date, 'short'),
      ),
    );

    //Location
    $node-&gt;field_location = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;location,
      ),
    );


    //Home team
    $node-&gt;field_home = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;home,
      ),
    );

    //Visitor
    $node-&gt;field_away = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;visitor,
      ),
    );

    //Division
    $node-&gt;field_divsion = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;divisoin,
      ),
    );

    //Program
    $node-&gt;field_program = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;program,
      ),
    );

    //Time
    $node-&gt;field_time = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;time,
      ),
    );

    //Field
    $node-&gt;field_number = array(
      0 =&gt; array(
        'value' =&gt; $om__result-&gt;field_nuber,
      ),
    );

    node_submit($node);
    node_save($node);
    drupal_set_message(t('@node has been created', array('@node' =&gt; $node-&gt;title)));
?&gt;