in reply to Re: MS Access database problem
in thread MS Access database problem

oops, looks like my manual search/replace didn't function well. Now that error looks right :P

So, I changed like you showed, and no dice. Same error

Any other thoughts?

Replies are listed 'Best First'.
Re^3: MS Access database problem
by roboticus (Chancellor) on Nov 29, 2007 at 17:20 UTC
    vdubjunkie:

    OK then for the next step, let's just try to change the error message. Change the line:

    my $dbh = DBI->connect("DBI:ODBC:$dstring","","");
    to
    my $dbh = DBI->connect("DBI:ODBC:driver={SQL Server};" . "SERVER=Bobs.pancake.hut;DATABASE=flapjacks;", "account","password");
    Hopefully, instead of the error you're getting, you'll get one about not being able to connect.

    ...roboticus

      Sorry if this double posts..

      So I changed like you said, however fixing some quoting issues..

      my $dbh = DBI->connect("DBI:ODBC:driver={SQL Server};","SERVER=Bobs.pa +ncake.hut;DATABASE=flapjacks;","account","password");
      I got the following errors:
      DBI->connect using 'old-style' syntax is deprecated and will be an err +or in futu re versions at C:\temp\temp.pl line 14 install_driver(password) failed: Can't locate DBD/password.pm in @INC +(@INC cont ains: C:/Perl/site/lib C:/Perl/lib .) at (eval 4) line 3. Perhaps the DBD::password perl module hasn't been fully installed, or perhaps the capitalisation of 'password' isn't right. Available drivers: DBM, ExampleP, File, Gofer, ODBC, Proxy, SQLite, Sp +onge. at C:\temp\temp.pl line 14
      Ok, so I slightly changed the line you put down as the quoting was a bit off..

      my $dbh = DBI->connect("DBI:ODBC:driver={SQL Server};","SERVER=Bobs.pa +ncake.hut;DATABASE=flapjacks;","account","password");
      and then I got the following error:

      DBI->connect using 'old-style' syntax is deprecated and will be an err +or in futu re versions at C:\temp\temp.pl line 14 install_driver(password) failed: Can't locate DBD/password.pm in @INC +(@INC cont ains: C:/Perl/site/lib C:/Perl/lib .) at (eval 4) line 3. Perhaps the DBD::password perl module hasn't been fully installed, or perhaps the capitalisation of 'password' isn't right. Available drivers: DBM, ExampleP, File, Gofer, ODBC, Proxy, SQLite, Sp +onge. at C:\temp\temp.pl line 14
        vdubjunkie:

        Hmmm ... what version of DBI & DBD::ODBC are you using? that works fine for me. (aside from the quoting probs).

        Update: Oh ... those weren't quoting problems. You changed a dot into a comma. (I only did that because I hate line wrapping in code samples.) Ultimately, it should be:

        my $dbh = DBI->connect("DBI:ODBC:driver={SQL Server};SERVER=Bobs.panca +ke.hut;DATABASE=flapjacks;", "account","password");
        ...roboticus