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

Re: [MacPerl-AnyPerl] DBI under the MAC

Thread Previous
From:
Sean Murphy
Date:
December 9, 2011 10:18
Subject:
Re: [MacPerl-AnyPerl] DBI under the MAC
Message ID:
A8EBB660-7DCA-45BF-ADF4-403C203F4245@gmail.com
Hi  Keary 

Ouch, it was right in front of my nose and I didn't see it.

Thanks.
On 10/12/2011, at 2:53 AM, Keary Suska wrote:

> 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


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