Re: handle dupicate data entry (was insert into two table and check table perl DBI)

2004-04-05 Thread patty . a . fugate
(was insert into two table and check table perl DBI

Re: Std.'ized error codes (was insert into two table and check table perl DBI)

2004-04-01 Thread Tim Bunce
On Wed, Mar 31, 2004 at 08:23:02PM -0800, Michael Peppler wrote: On Wed, 2004-03-31 at 17:56, Jonathan Leffler wrote: Dean Arnold wrote: A few months ago we had discussed on this list _standardizing_ error handling for things like trying to insert duplicate records, but I kind of dropped

Re: insert into two table and check table perl DBI

2004-03-31 Thread patty . a . fugate
insert into two table and check table perl DBI

Re: insert into two table and check table perl DBI

2004-03-31 Thread Michael Ragsdale
hai everyone, i have write scripts perl on the top and if i input data 12345678,Hendra Kusnandar,123456 data will insert into table user, and if i input wrong format data will insert into log. this scripts is work but if i insert again 12345678,Hendra Kusnandar,123456 scripts will error and the

Re: insert into two table and check table perl DBI

2004-03-31 Thread Hardy Merrill
I believe that currently the only way to properly handle that is to capture the error output ( 'perldoc DBI' at a command prompt and search for Transaction and eval) and parse that output for something common to all instances where you try to insert a duplicate record. Something like the string

Re: Std.'ized error codes (was insert into two table and check table perl DBI)

2004-03-31 Thread Dean Arnold
A few months ago we had discussed on this list _standardizing_ error handling for things like trying to insert duplicate records, but I kind of dropped the ball - changing jobs and all didn't leave me enough time to persue that standardization with members of this list. And since now I don't

Re: Std.'ized error codes (was insert into two table and check table perl DBI)

2004-03-31 Thread Jonathan Leffler
Dean Arnold wrote: A few months ago we had discussed on this list _standardizing_ error handling for things like trying to insert duplicate records, but I kind of dropped the ball - changing jobs and all didn't leave me enough time to persue that standardization with members of this list. And

Re: Std.'ized error codes (was insert into two table and check table perl DBI)

2004-03-31 Thread Dean Arnold
Dean Arnold wrote: A few months ago we had discussed on this list _standardizing_ error handling for things like trying to insert duplicate records, but I kind of dropped the ball - changing jobs and all didn't leave me enough time to persue that standardization with members of this list.

Re: Std.'ized error codes (was insert into two table and check table perl DBI)

2004-03-31 Thread Michael Peppler
On Wed, 2004-03-31 at 17:56, Jonathan Leffler wrote: Dean Arnold wrote: A few months ago we had discussed on this list _standardizing_ error handling for things like trying to insert duplicate records, but I kind of dropped the ball - changing jobs and all didn't leave me enough time to

Re: Std.'ized error codes (was insert into two table and check table perl DBI)

2004-03-31 Thread Jonathan Leffler
Dean Arnold wrote: Jonathan Leffler wrote: Dean Arnold wrote: Hardy Merrill wrote: A few months ago we had discussed on this list _standardizing_ error handling for things like trying to insert duplicate records [...] Basically all it involved was putting together a list of common error

insert into two table and check table perl DBI

2004-03-27 Thread Hendra Kusnandar
#!/usr/bin/perl use DBI; sub insert_user { my ($nim, $nama, $password) = @_; my ($insert_sql,$sth); $database = practice_perl; $dbuser = hendra; $dbpasswd = hendra; $dbhost = localhost; $dsn = DBI:mysql:database=$database;host=$dbhost; $dbh = DBI-connect($dsn,$dbuser,$dbpasswd) || die