Re: To find a just-inserted record

2001-12-24 Thread Brent Cowgill
It was pointed out to me: >Oracle: >> $dbh->do(CREATE SEQUENCE table_uid_seq START WITH 1 INCREMENT BY 1) >> $dbh->do(CREATE TABLE table ( uid NUMBER(10) PRIMARY KEY ... )) >> $dbh->do(INSERT INTO table (table_uid_seq.NEXTVAL, field...) VALUES (...)) >meanwhile someone else inserts some records

Re: To find a just-inserted record

2001-12-21 Thread Brent Cowgill
..) select * from table where first_name='...' and last_name='...' show us your table structure and we can help you out more. S P Arif Sahari Wibowo wrote: >On Fri, 21 Dec 2001, Brent Cowgill wrote: > >>It depends on the database driver you are connected to. >&

Re: To find a just-inserted record

2001-12-21 Thread Brent Cowgill
It depends on the database driver you are connected to. For example: MySQL: $dbh->do(CREATE TABLE table ( uid INT AUTO_INCREMENT PRIMARY KEY ... ) ) $dbh->do( INSERT INTO table (field...) VALUES (...)) using DBI, $unique_id = $dbh->{'mysql_insertid'}; Oracle: $dbh->do(CREATE SEQUENCE table_uid_se

Re: 1-10, 11-20

2001-11-30 Thread Brent Cowgill
I solved this problem just the other day after searching google. I needed to have an order by and where clause preserved. Here's what I came up with. Note, I haven't done any stress testing on this query yet. If anyone comes up with an improvement I'd be interested in getting a CC. SELECT fie

Re: troubles

2001-11-26 Thread Brent Cowgill
you don't want to say perl -MDBD -e "print $DBD::VERSION" you want to say perl -MDBD::ODBC -e "print $DBD::ODBC::VERSION" Godoli Davide wrote: >Hi all, I'm Dego and I have some problem to installing modules. > > I've already installed DBI-1_20 on my system, and when try to >install DBD::ODBC

Re: DBD::ODBC behaves differently under IIS

2001-11-26 Thread Brent Cowgill
teur wrote: >On Fri, 23 Nov 2001 14:17:08 -0800, Brent Cowgill wrote: > >>$dbh = >>DBI->connect('dbi:ODBC:database=test_dblayer;server=brent;driver=SQL >>Server', 'sqluser', '*') || print "cannot connect: $DBI::errstr\n"; >>pri