perl as win32 and DSNless con to mdb?

Discussion in 'Perl Misc' started by rob merritt, Aug 1, 2003.

  1. rob merritt

    rob merritt Guest

    Hi here is wat I am trying:

    use Win32::ODBC;


    #my $dsn = "Provider=Microsoft.Jet.OLEDB.4.0;
    dbq=h:/logs/mail/report/addressTrack.mdb";

    my $dsn = 'driver=Microsoft Access
    Driver(*.mdb);dbq=h:/logs/mail/report/addressTrack.mdb';


    my $myDb = new Win32::ODBC($dsn);
    #
    if (!$myDb)
    {
    print "failed to conect to $DSN\n";
    Win32::ODBC::DumpError();
    die;
    }



    what I get is:

    H:\logs\mail\report>perl addresstrack.pl
    failed to conect to

    ---------- Error Report: ----------
    Errors for the package:
    Connection Number:
    Error number: 911
    Error message: "[Microsoft][ODBC Driver Manager] Data source name not
    found and
    no default driver specified"
    -----------------------------------
    Died at addresstrack.pl line 26.


    any ideas?
     
    rob merritt, Aug 1, 2003
    #1
    1. Advertising

  2. rob merritt

    mgarrish Guest

    "rob merritt" <> wrote in message
    news:...
    > Hi here is wat I am trying:
    >
    > use Win32::ODBC;
    >
    >
    > #my $dsn = "Provider=Microsoft.Jet.OLEDB.4.0;
    > dbq=h:/logs/mail/report/addressTrack.mdb";
    >
    > my $dsn = 'driver=Microsoft Access
    > Driver(*.mdb);dbq=h:/logs/mail/report/addressTrack.mdb';

    ^^

    Spaces are important! Change $dsn to:

    my $dsn = 'driver=Microsoft Access Driver
    (*.mdb);dbq=h:/logs/mail/report/addressTrack.mdb';

    and it should connect.

    Matt
     
    mgarrish, Aug 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vikas Yadav
    Replies:
    0
    Views:
    1,146
    Vikas Yadav
    Sep 9, 2003
  2. Liber
    Replies:
    4
    Views:
    4,895
    Tristan
    Sep 6, 2004
  3. =?Utf-8?B?UGhpbA==?=

    Faster access to MDB? MS Access MDB and ASP

    =?Utf-8?B?UGhpbA==?=, Jan 26, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    497
    Kevin Spencer
    Jan 27, 2005
  4. Replies:
    4
    Views:
    4,411
  5. Matteo Mancini

    Piccolo con problema con il tipo float

    Matteo Mancini, Oct 8, 2007, in forum: Ruby
    Replies:
    3
    Views:
    232
    Jano Svitok
    Oct 8, 2007
Loading...

Share This Page