Re: [MacPerl-AnyPerl] DBI under the MAC

[email protected] (Keary Suska) Fri, 9 Dec 2011 08:53:08 -0700
Newsgroups perl.macperl.anyperl
Message-ID <[email protected]>
On Dec 9, 2011, at 4:42 AM, Sean Murphy wrote:

> my $sth2 =3D $dbh->prepare("insert into trans (accounts, =
transaction_date, description, amount, amount_type, transaction_type, =
serial, category_id) values (?, ?, ?, ?, ?, ?, ?, ?);")
> 	          or die("Cannot prepare: " . DBI::errstr() );
>=20
>=20
> When the above is executed in the full script. We get the following =
error:
>=20
> 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