[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

Access 2003 CGI with Perl

Asked by Zeek0 in Perl Programming Language

Tags: access, odbc, perl

I'm a newbie working with perl/cgi, and in my attempt to teach myself what's up with it, I've run into a snag that hasn't been solved by exhaustive googling.  I'm attempting to get data from an Access 2003 database using a perl script (with ActivePerl 5.8.1.807) and I keep getting the error:

DBI connect('%name%) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002))DBD: db_login/SQLConnect err=-1)

I don't know jack about ODBC drivers, and I'm just now learning perl, so I'm assuming that the syntax of my script is no good:

    use strict;
    use DBI;

    #open connection to Access database
    my $DBH = DBI->connect("dbi:ODBC:%name%");

I've seen a bunch of examples of working code that allows you to open an access database, but what confuses me is exactly what's happening (makes it tough to figure out what I'm doing wrong).  %name% should be the filename (without the extension?) of a .dsn file located in Program Files\Common Files\ODBC\Data Sources in XP Pro, right?  I got that .dsn file set up through a wizard in the export option of Access, which gave me an error:

     You cannot use ODBC to import from, export to, or link an external Microsoft Jet or ISAM database table to your database.  

not quite sure what the hell that's supposed to mean, but I'm certainly not trying to do anything tricky - just create a connection to let Perl read from my access database (i.e. learn to crawl before you learn to walk).  I noticed a few results on Google mentioning that there was a problem with the DBI:ODBC module in activeperl, is that the case?  

I just want to be able to create a connection to the Access databse - eventually this will become a CGI script to take form input from a web page and use it to search the database for records matching the input criteria, then output some data from the matching records to the user - not rocket science but tricky enough for a novice.

Any ideas where I might be screwing up?  Any common pitfalls to look out for?  Any obvious mistake in something I mentioned above?
 
Related Solutions
Keywords: Access 2003 CGI with Perl
 
Loading Advertisement...
 
[+][-]11/18/04 06:22 AM, ID: 12614639Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Perl Programming Language
Tags: access, odbc, perl
Sign Up Now!
Solution Provided By: kandura
Participating Experts: 3
Solution Grade: C
 
[+][-]11/17/04 02:36 PM, ID: 12609568Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/17/04 03:07 PM, ID: 12609767Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/18/04 06:12 AM, ID: 12614542Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/18/04 06:20 AM, ID: 12614617Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/18/04 07:39 AM, ID: 12615433Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/18/04 10:37 AM, ID: 12617421Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/18/04 12:16 PM, ID: 12618413Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/18/04 01:14 PM, ID: 12618963Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93