As for doing this strictly with SQL, I talked to a couple people and they cringed. The information they gave me is that without using ADO, @@IDENTITY isn't set when you're interfacing MS Access. What they actually do is requery for the record they just inserted and pull the number that way.

As far as using ADO, you're going to make something just as unportable as writing ASP. But if you want to try it, you will infact use Win32::OLE. Example..

use Win32::OLE; my $rs = new Win32::OLE("ADODB.Recordset"); # you're going to have to define your consts that # you're using in the vbscript example $rs.Open('NOTICE', etc.. ); $rs->AddNew(); $rs->{'title'}{'Value'} = $somevalue; <....> $rs->Update(); my $last_id = $rs->{'ID'}{'Value'};
written off the cuff so knowing me there's errors, but that's the basic usage under Win32::OLE.

Hope this helps..
Rich


In reply to Re: Re: Re: A Question on ADO and a comment on Microsoft by rchiav
in thread A Question on ADO and a comment on Microsoft by simon.proctor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.