develooper Front page | perl.macperl.anyperl | Postings from December 2011

Re: [MacPerl-AnyPerl] DBI under the MAC

Thread Previous | Thread Next
From:
Keary Suska
Date:
December 9, 2011 07:53
Subject:
Re: [MacPerl-AnyPerl] DBI under the MAC
Message ID:
1903F5A7-E5EC-4BDF-ACA1-CDF89FEEF7DC@pcisys.net
On Dec 9, 2011, at 4:42 AM, Sean Murphy wrote:

> my $sth2 = $dbh->prepare("insert into trans (accounts, transaction_date, description, amount, amount_type, transaction_type, serial, category_id) values (?, ?, ?, ?, ?, ?, ?, ?);")
> 	          or die("Cannot prepare: " . DBI::errstr() );
> 
> 
> When the above is executed in the full script. We get the following error:
> 
> DBD::SQLite::db prepare failed: table trans has no column named accounts at ./insert_budget.pl line 60.
> Cannot prepare: table trans has no column named accounts at ./insert_budget.pl line 60.

"accounts" (plural)

> sqlite> .schema trans
> CREATE TABLE trans (transaction_id int primary key, account int, transaction_date date, description varchar(80), amount decimal (11,2), amount_type varchar(3) not null, transaction_type varchar(40), serial varchar(40), category_id int);

"account" (singular)

HTH,

Keary Suska

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About