64位perl是否包括所有32位perl模块? [英] Does 64 bit perl includes all 32 bit perl modules?

查看:191
本文介绍了64位perl是否包括所有32位perl模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了64位perl的64位操作系统.我已经获得了从MS Access 2007中的表中检索数据的任务(ms访问为32位).我尝试执行的程序代码弹出并显示错误

I've got 64-bit operating system on which I have installed 64-bit perl. I've been given a task to retrieve data from a table in MS Access 2007 (ms access is 32 bit). The program code that I try to execute pops up with an error which says

DBI connect('Driver={Microsoft Access Driver (*.mdb,*.accdb)};DBQ=C:\test\INSTRUCTIONS.mdb','',...) failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (SQL-IM002) at C:/test/connectaccess.pl line 7.
cannot connect to DB at C:/test/connectaccess.pl line 7.  

代码是

#!perl  
use strict;  
use warnings;  
use DBI;  
my $DBFile = q(C:\test\INSTRUCTIONS.mdb);   
my $dbh = DBI->connect("dbi:ODBC:Driver={Microsoft Access Driver (*.mdb)};DBQ=$DBFile",'','') or die("cannot connect to DB");  
my $SQLquery = "SELECT * FROM IndemDate";  
my $sth = $dbh->prepare($SQLquery);
my $rc = $sth->execute;
while (my $href = $sth->fetchrow_hashref) {
print "memberID: " . $$href{"memberID"} . "\n";
print "memberName: " . $$href{"memberName"} . "\n";
print "\n";
}  

所以我想知道64位perl是否包括所有32位模块...或者在ms访问的连接中是否有任何错误.请引导我.

So I was wondering if 64 bit perl include all 32 bit modules... or is there any mistake in the connection to ms access. Please guide me.

推荐答案

如果我使用32位perl执行该程序,则该程序可以正常运行.

The program works fine if I execute the program with 32-bit perl.

这篇关于64位perl是否包括所有32位perl模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆