in reply to Re: DBI modules for database representation in plain files
in thread DBI modules for database representation in plain files

That's sound wounderfull :=) Would it also interface with DB_files and MLDBM?
i've finally put the DBD::SQlite working. i've created a few tables, a unique index but i got one concern
how can i limit the data to fit in a standard SQl type:like info char(32) i've run a small test and i don't get a data limit.
#!/usr/bin/perl -w use strict; use warnings; use DBI; use DBD::SQLite; my $dbh = DBI->connect("dbi:SQLite:dbname=foo", "", "", {AutoCommit => + 1, RaiseError => 1}); $dbh->do("CREATE TABLE info (f1 char(3) primary KEY, f2 char(3), f3 ch +ar(3))"); $dbh->do('create unique index info_idx on info (f1)'); my $sth = $dbh->prepare("INSERT INTO info VALUES (?, ?, ?)"); $sth->execute("Fred", "Bloggs", "fred\@bloggs.com"); $sth = $dbh->prepare("SELECT * FROM info"); $sth->execute(); while (my @row = $sth->fetchrow_array ) { print "@row\n"; } $dbh->disconnect;
this get Fred", "Bloggs", "fred\@bloggs.com". So i must assume that DBD::SQLite don't test for type size?
sure i can count the data size each time i insert them into the database but would prefer that SQLite ensures
that i don't forget about it... Any hint if i can get a free lunch here?

Thanks for all the help here and thanks in advance for all the forthcomming one.
Filipe

Replies are listed 'Best First'.
Re: Re: DBI modules for database representation in plain files
by phemes (Scribe) on Feb 26, 2004 at 10:36 UTC