use DBI; $dbName= 'testdb'; $dbHost = 'localhost'; $dbUser = 'testuser'; $dbPass = 'testpasswort'; $dsn="dbi:PgPP:dbname=$dbName;host=$dbHost;port=5432"; $dbh=DBI->connect("$dsn","$dbUser","$dbPass") or die "Datenbank nicht erreichbar"; $a='?'; $b="b"; $sql="INSERT INTO test (text1,text2) VALUES (?,?)"; $prep_sql=$dbh->prepare($sql) or die p$dbh->errstr; $prep_sql->execute($a,$b) or $dbh->errstr; $prep_sql->finish;