Re: execute

2001-11-01 Thread Hardy Merrill
I prefer to raiserrors and catch them using eval, like this: $dbh-{RaiseError} = 1; $sth = $dbh-prepare($insert_sql); ### prepare error will cause die foreach $one (@many) { eval { $sth-execute($one); ### execute error caught in eval's $@ }; if ($@) { warn Error on

Looping through recordset twice

2001-11-01 Thread Don Seiler
Is there a way to back through a recordset after I've already gone through it? I want to go through the recordset, determining if certain groups of records meet my criteria. Then I want to go through again and print the groups that qualify. Since I have to deal with groups of records, I

Re: Looping through recordset twice

2001-11-01 Thread Marcelo Guelfi
I don't think so. Why don't you put the selected records in an auxiliary structure (hash, array) and then go through that structure? Saludos, Marcelo.

Re: Looping through recordset twice

2001-11-01 Thread Don Seiler
I was considering this, but just thought it would be easier to just set the flag in an aux structure and loop through my original recordset again, checking the flag each time. Anyone know if there is a definitive yes/no on this? Thanks, Don. -- Don Seiler [EMAIL PROTECTED]

RE: Looping through recordset twice

2001-11-01 Thread Kong, Alan
In Oracle database SQL The from clause can contain another sql statement as temp table. In which you can select the demanded records, then testify for the qualification in the main SQL. For example: Select a.column1, a.column2 From (select column1, column2 From table_name

Re: Looping through recordset twice

2001-11-01 Thread Don Seiler
Actually the nature of the problem is what stopped me from doing this. I won't know which records I want until I look at the group of them. Example: I have a table of records. There is a groupnum column. Many records have the same groupnum, i.e. they are in the same group. I'm only

MS Access Too Few Parameters Error Help

2001-11-01 Thread Alan Hogue
Hello, I am trying to execute an update to an Access database. The statement has two placeholders, and I put two variables between the parentheses in the execute statement, and yet Access tells me it expects 3 parameters. This is the prepare: my $sth_del = $dbh-prepare( UPDATE [DBI_TEST] SET

Re: Looping through recordset twice

2001-11-01 Thread Michael Peppler
Don Seiler writes: I was considering this, but just thought it would be easier to just set the flag in an aux structure and loop through my original recordset again, checking the flag each time. Anyone know if there is a definitive yes/no on this? There are various issues to consider,

Re: Looping through recordset twice

2001-11-01 Thread Don Seiler
Basically, when I get to a new group number. The record set is ordered by group number, so all records in a group are together. As I'm looping through records in a group, I do some evaluation and add values to variables. When I get to a new group number, I look at the values. If they meet my

Re: Looping through recordset twice

2001-11-01 Thread Don Seiler
Perhaps I'm missing it, then. basically my query is this: select cust_no, acct_type, acct_status, group_num from cust,acct where cust.cust_no=acct.cust_no order by group_num the values of acct_type and acct_status for all of the records in a group determine if I want that group or not. I

Re: Looping through recordset twice

2001-11-01 Thread David Marshall
I'll second the suggestion made a few messages back about storing your results in some other data structure (as opposed to re-traversing the data structure that DBI gives you). In your circumstances, I'd probably put the retrieved rows in a hash of arrays (keyed by group number) before doing

Re: Looping through recordset twice

2001-11-01 Thread Don Seiler
That will probably be the solution. Thanks to all involved! Don. On Thu, 1 Nov 2001, David Marshall wrote: I'll second the suggestion made a few messages back about storing your results in some other data structure (as opposed to re-traversing the data structure that DBI gives you). In

RE: Looping through recordset twice

2001-11-01 Thread Wilson, Doug
From: Don Seiler [mailto:[EMAIL PROTECTED]] Basically, when I get to a new group number. The record set is ordered by group number, so all records in a group are together. As I'm looping through records in a group, I do some evaluation and add values to variables. When I get to a new

RE: First try: Compiling Static Perl with DBI and DBD::Informix

2001-11-01 Thread Gary L. Burnore
At 12:28 11/01/2001, Mahdi A. Sbeih wrote: Hi Gary, Thanks for these steps, I have some questions for you: - The shell script at the beginning of your email is to be used after compiling Perl statically with all needed modules other than DBD::Informix, right? After everything BUT the

Re: MS Access Too Few Parameters Error Help

2001-11-01 Thread Bart Lateur
On Thu, 01 Nov 2001 11:03:56 -0800, Alan Hogue wrote: I am trying to execute an update to an Access database. The statement has two placeholders, and I put two variables between the parentheses in the execute statement, and yet Access tells me it expects 3 parameters. This behaviour has had me

Column Names

2001-11-01 Thread Venkataramana Mokkapati
May be a simple Q... How do I get column names and order of column names for a select * from ... query. I dont want to use selecthash_ref just for column names. Thanks in advance, --MVRamana _ Get your FREE download of MSN

[netlabs #64] Re: How to install DBI for Oracle

2001-11-01 Thread Ivan Kavuma
I am developing an Intranet for my company. We have an oracle database version 8i running on another Linux machine. which I want to use as a backborn. I have tried to Install DBI on Windows NT Server using: perl Makefile.pl and I get an error: Can't locate loadable for modle DBI ...In

RE: [netlabs #64] Re: How to install DBI for Oracle

2001-11-01 Thread Sterin, Ilya
Use ActivePerl from www.activestate.com. Use it's ppm utility to install modules (binaries). See docs for ppm. Ilya -Original Message- From: Ivan Kavuma [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:51 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: