I am trying to install the DBD::ODBC module on my unix machine, so that I can use my Access Database, on my remote windows machine. (My website to communicate with my access database on my windows machine remotely).

I am getting this error in my shell:

Useless use of private variable in void context at Makefile.PL line 43 +1. Configuring DBD::ODBC ... >>> Remember to actually *READ* the README file! And re-read it if you have any problems. Using DBI 1.48 (for perl 5.008004 on i686-linux) installed in /usr/lib +/perl5/site_perl/5.8.4/i686-linux/auto/DBI/ The DBD::ODBC module needs to link with an ODBC 'Driver Manager'. (The Driver Manager, in turn, needs one or more database specific ODBC + drivers. The DBD::ODBC module does _not_ include any ODBC drivers!) You need to indicate where your ODBC Driver Manager is installed. You can do this ether by setting the ODBCHOME environment variable or by runing 'perl Makefile.PL -o odbcdir'. If you do not have an ODBC Driver Manager you can try building the free iODBC Driver Manager in the iodbcsrc directory. Makefile.PL aborted.
Like I mentioned above the Database is actually on a remote windows machine. The machine I'm installing this on, is the unix machine that I have my website running on.

I setup a DSN in the "ODBC Data Sources" on that windows machine, so that I can login to access that database. I guess that is how I need to do it. I don't know if that Windows serve actually has an sql server on it, I don't know how to tell if it does. I only use the windows server for a few things, however, those few things are imperitive to my company, thus I only use it for those purposes, and do not really know anything else about the server.

Does this DBD::ODBC module work on a unix server running perl? Or is it for a windows machine, running ActivePerl? If it can work on a unix machine, can I remote login to the access db, like I do for a mysql server?

Here is how I login to my remote database:
sub ConnectToDB { my $host_name = "01.002.003.04";# Ip Address Here my $db_name = "DataBaseName"; # Database Name to connect t +o my $dsn = "DBI:mysql:host=$host_name;database=$db_name"; return (DBI->connect ($dsn, "usernameHere", "PasswordHere" +, {PrintError => 0, RaiseError => 1})); }
So, that being the case, would this code:
sub ConnectToDB { my $host_name = "002.003.004.05"; my $db_name = "DBName"; my $dsn = "dbi:ODBC:Clients:host=$host_name;database=$db_n +ame"; return (DBI->connect ($dsn, "UserNameHere", "PassWordHere" +)); # Clients being the name I set in the Windows Data Sources (ODBC) }
Login to the remote access db?

The Readme file says this:
  set-up these environment variables:
    DBI_DSN   The dbi data source, e.g. 'dbi:ODBC:YOUR_DSN_HERE'
    DBI_USER  The username to use to connect to the database
    DBI_PASS  The username to use to connect to the database
    ODBCHOME  (Unix only) The dir your driver manager is installed in
  perl Makefile.PL
  make                (or nmake, if VC++ on Win32)
  make test           (or nmake, if VC++ on Win32)
Where do I specify those at?

Thank you a ton for any help you can be...

thx,
Richard

In reply to Help with installation and use of the DBD::ODBC module by powerhouse

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.