We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Perl and MS-ACCESS Databases

brewman
brewman asked
on
Medium Priority
263 Views
Last Modified: 2010-03-05
I need some help with a good starting place on how to use PERL to access a database that is written using MS-ACCESS. I am still a rookie PERL programmer but have managed to make some flat file text databases.  

I am using the PERL version from Activestate.com for 95/NT.  I want to learn how to go about taking a sample MS-ACCESS database, say a simple table, use PERL to perhaps retrieve some information and say display the information.  My ultimate goal is to be able to create a web page and have a user input somthing they are looking for and display it back html....

I just need a good mentor out there to get me going.  What do I need to do?  I have heard you need to use Win32 ODBC on you PC to bind the file or somthing like that?  What steps to I need to do to get going?  

I have several books.. "Learnign PERL" "Advanced PERL" and "Programming PERL" books that I have purchased but it is very intimidating looking at these books somtimes and would appreciate some real guidance?  

Perhaps some simple examples laying around that you can also email me with......  

Comment
Watch Question

Author

Commented:
Edited text of question

Author

Commented:
Adjusted points to 550
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
OK.  I downloaded the files and followed the instruction in the readme file.  I know get a PARSE EXCEPTION error when executing
the test you gave me....

I know.. Small Steps..  How do I fix this error please?

Commented:
OK, you did a full install?  What this means is that the version of Perl you're using, and the version of Win32::ODBC you're using don't match.

I'd guess you're unfortunately using the ActiveState perl?  Do you have either Visual C++ or Borland C++?  If so, go ahead and actually compile Win32::ODBC and then install it (Directions on how to do so should be in a file called INSTALL).

If you have no compiler, show the results of

c:\>perl -V

and we'll see what we can do.

Author

Commented:
I found this on the error:
What does "Parse Exception" mean?
When Win32::ODBC is compiled it is compiled to run with a specific build of Win32 Perl. If Activeware makes internal changes to Win32 Perl that are not compatible with the specific build of Win32::ODBC you are using, you will see the infamous "Parse Exception" error. This simply means that you can not use the particular build of Win32::ODBC and Win32 Perl. This usually takes place if you upgrade to a newer build of Win32 Perl.
The solution is to either not upgrade to the newer build of Win32 Perl or wait for a newer build of Win32::ODBC. You can always recompile it yourself if you want.
----
How do use the files to compile with the newer build?  I don't have a C compiler.  Is there aleady a version that will work with the current build I have, which is 316.
or could you compile this for me and e-mail me at
Michael.C.Lammon@mci.com

Thanks!

Commented:
Arghhh. I absolutely loath the ActiveWare port....

If you have a fast link, I'd recommend that you download

http://www.perl.com/CPAN-local/authors/id/GSAR/libwin32-0.12.zip

and

http://www.perl.com/CPAN-local/authors/id/GSAR/perl5.00402-bindist04-bc.zip

follow the instructions (first bindist, then libwin). You might want to grab the readme's also, although they're included in the zips.

In any case, follow the directions to install, purge your system of all activeware stuff ( :))
and Voila!  You'll have a real working perl, and a real working ODBC (plus DBD::ODBC as a bonus)

Author

Commented:
I found this on the error:
What does "Parse Exception" mean?
When Win32::ODBC is compiled it is compiled to run with a specific build of Win32 Perl. If Activeware makes internal changes to Win32 Perl that are not compatible with the specific build of Win32::ODBC you are using, you will see the infamous "Parse Exception" error. This simply means that you can not use the particular build of Win32::ODBC and Win32 Perl. This usually takes place if you upgrade to a newer build of Win32 Perl.
The solution is to either not upgrade to the newer build of Win32 Perl or wait for a newer build of Win32::ODBC. You can always recompile it yourself if you want.
----
How do use the files to compile with the newer build?  I don't have a C compiler.  Is there aleady a version that will work with the current build I have, which is 316.
or could you compile this for me and e-mail me at
Michael.C.Lammon@mci.com

Thanks!

Author

Commented:
Thanks.. Actually, I just found a beta compiled odbc.pll file and so I tried this and did not get the error's.  I ran the 'perl test.pl' and it ran through and said there is not any errors......

Well I will give it a try now...  I am sure you'll here from me again..

Thanks !!!!!

Author

Commented:
Thanks.. Actually, I just found a beta compiled odbc.pll file and so I tried this and did not get the error's.  I ran the 'perl test.pl' and it ran through and said there is not any errors......

Well I will give it a try now...  I am sure you'll here from me again..

Thanks !!!!!

Commented:
I understand your rush to get going, but I'll warn you, ActiveWare is going to bite you again in the future :]

Since you don't really lose anything by using the standard version of perl, and stand to gain a lot (i.e. threads, compilation to c code, etc) you'll probably want to thing seriously about switching to the standard version.

Good luck.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.