FAQ
This program produces an error which looks wrong to me:

-------------------------------------------------------
#!/usr/bin/env perl
use strict;
use DBI;

my $dbh = DBI->connect('dbi:SQLite:test.db', '', '',
{ AutoCommit => 1,
PrintError => 0,
RaiseError => 1 });

eval { $dbh->do("drop table X"); };

$dbh->do("create table X(a TEXT, b TEXT, unique(a, b))");

my $sth = $dbh->prepare("insert into X(a, b) values('N', ?)");

$sth->execute('1.1');
$sth->execute('1.10');
-------------------------------------------------------

When run, I see:

$ ./test-sqlite.pl
DBD::SQLite::st execute failed: columns a, b are not unique(1) at
dbdimp.c line 401 at ./test-sqlite.pl line 17.

Is this correct behaviour?

- Will

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupdbi-users @
categoriesperl
postedMar 14, '07 at 1:41a
activeMar 14, '07 at 1:12p
posts2
users2
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase