Link to home
Start Free TrialLog in
Avatar of brewman
brewman

asked on

Perl and MS-ACCESS Databases

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......  

Avatar of brewman
brewman

ASKER

Edited text of question
Avatar of brewman

ASKER

Adjusted points to 550
ASKER CERTIFIED SOLUTION
Avatar of b2pi
b2pi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brewman

ASKER

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?
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.
Avatar of brewman

ASKER

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!
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)

Avatar of brewman

ASKER

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!
Avatar of brewman

ASKER

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 !!!!!

Avatar of brewman

ASKER

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 !!!!!

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.