我试图运行的代码块,我得到这个错误:收到一个错误在Perl编码,当我尝试使用DBI使用SQLite
DBI connect('dbname=C:\Users\pdk11.UFAD\Desktop\RA\sap_populate','',...) failed: unable to open database file(1) at dbdimp.c line 94 at C:\Users\pdk11.UFAD\Desktop\RA\Perl\Extract items\04createheader_SAP_pk.pl line 41.
#!/usr/bin/perl -w
use HTML::Scrubber;
use HTML::TreeBuilder;
use HTML::FormatText;
use DBI;
use Time::HiRes qw(gettimeofday);
# Creates a table that holds heading information from Edgar 10-K Files.
$total1=gettimeofday;
#First specify the directory containing the files you want to get.
#use random sort, a file containing 10 files
$directory="D:\\ExternalFiles\\Edgar\\tenks\\";
#if windows, slash is "\\", mac "/";
$slash="\\";
#Connect to database
#$DSN is data source name
#$DSN='dbi:SQLite:dbname=A:\\MyFiles\\MyPapers\\Differential_Contagion\\Analysis\\Input\\acctgchanges.sqlite';
$DSN='dbi:SQLite:dbname=C:\\Users\\pdk11.UFAD\\Desktop\\RA\\sap_populate';
$use='';$pword='';
#connect to the sqlite database
$dbh=DBI->connect($DSN,$use,$pword,{RaiseError=>1, AutoCommit=>1});
我编辑了你的问题来显示图像,但它看起来像是一个断开的链接 – Borodin
你需要更多的空白空间来使你的代码可读。并且'严格使用'是强制性的。 – Borodin
看起来你不熟悉电脑,更不用说编程了。你试图通过编辑你在某处找到的一些脚本来做某件事,但这肯定会以失望告终。 –