Re: db to passwd comparison

2003-03-27 Thread Ian Harisay
Have you evaluated exactly what your split is handing you and also exactly what is in the database? You say maybe a 10th of the time you don't see the result you expect. Could this be due to rogue characters introduced in your db or file data. Since what you are printing when you don't find a m

Re: db to passwd comparison

2003-03-27 Thread Paul Boutros
> $sql->execute($userP) > or warn "Can't execute select " . $sql->errstr; > $userD = $sql->fetchrow_array(); instead, try this instead: while (my @row = $sql->fetchrow_array()) { print join("\t", @row), "\n"; } > if($userD eq "") { > p

RE: db to passwd comparison

2003-03-27 Thread LBaxter
Try: foreach my $userID ( sql->fetchrow_array() ) { #check each user } -Original Message- From: Rob [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 3:48 PM To: [EMAIL PROTECTED] Subject: Re: db to passwd comparison What I'm experiencing is that, maybe a 10th of the tim

Re: db to passwd comparison

2003-03-27 Thread Rob
What I'm experiencing is that, maybe a 10th of the time it will give me a name that's in both; most of the time it will appear as if the name isn't in the database but if I check in by hand the name really is there. Is this the line thats the problem? $userD = $sql->fetchrow_array(); I've tried it

Re: db to passwd comparison

2003-03-27 Thread Tim Bunce
Oops, yes, it's fetchrow_array() Tim. On Thu, Mar 27, 2003 at 11:11:53AM -0800, Brian McCain wrote: > Do you guys mean fetchrow_array() or is there a function ( > fetch_rowarray() ) I've overlooked? > > -Brian McCain > > - Original Message - > From: "Tim Bunce" <[EMAIL PROTECTED]> > To:

Re: db to passwd comparison

2003-03-27 Thread Brian McCain
Do you guys mean fetchrow_array() or is there a function ( fetch_rowarray() ) I've overlooked? -Brian McCain - Original Message - From: "Tim Bunce" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, March 27, 2003 11:08 AM Subject: Re:

RE: db to passwd comparison

2003-03-27 Thread LBaxter
That would be it -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 2:08 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: db to passwd comparison On Thu, Mar 27, 2003 at 01:53:16PM -0500, [EMAIL PROTECTED] wrote: > $s

Re: db to passwd comparison

2003-03-27 Thread Tim Bunce
On Thu, Mar 27, 2003 at 01:53:16PM -0500, [EMAIL PROTECTED] wrote: > $sql->fetch_rowarray() returns a LIST. You are capturing the count of that list. Actully fetch_rowarray() returns just the first element when called in a scalar context. Perhaps the problem is that the statement returns more tha

RE: db to passwd comparison

2003-03-27 Thread LBaxter
$sql->fetch_rowarray() returns a LIST. You are capturing the count of that list. Lincoln -Original Message- From: Rob [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 1:12 PM To: [EMAIL PROTECTED] Subject: db to passwd comparison Hi, I'm trying to find out which users in a pass

Re: Connection errors - how to debug?

2003-03-27 Thread Rudy Lippan
On Thu, 27 Mar 2003, Eric Frazier wrote: > Hi, > > Thanks for the reply. I don't know for sure, but it doesn't look to me like > this is the issue. But it makes me think about things like that, but I am > not getting any messages about file descriptors or anything in the > /var/log/messages. When

db to passwd comparison

2003-03-27 Thread Rob
Hi, I'm trying to find out which users in a passwd file are not in a database. What I've tried so far(see below) finds a few but misses even more. I'm thinking it might be the way I'm preparing the statement or perhaps executing it? Something else all together? Any help appreciated. $sql = $d

RE: $dbh->unquote()

2003-03-27 Thread Sterin, Ilya (I.)
Well, if the file is transfered using FTP binary mode, the Unix new line is never converted to a Windows new line, therefore, it won't show up on windows files as a new line break. Ilya -Original Message- From: Brian Spindler [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 12:59

RE: $dbh->unquote()

2003-03-27 Thread Brian Spindler
Thank you everybody, it seems like my problem was using place holders and quote(). I have corrected it and it works great now thanks! Brian -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 1:18 PM To: Brian Spindler Cc: [EMAIL PROTECTED] Subjec

Re: $dbh->unquote()

2003-03-27 Thread Tim Bunce
Sounds like you might be using the quote() method with placeholders. If so, don't. When using placeholders you don't need to use quote(). Use mysql (the command line app) to see what the data looks like in the db. Tim. On Thu, Mar 27, 2003 at 11:19:04AM -0500, Brian Spindler wrote: > Hi guys, ga

(Fwd) CPAN Upload: T/TI/TIMB/DBD-Oracle-1.14.tar.gz

2003-03-27 Thread Tim Bunce
file: $CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.14.tar.gz size: 199667 bytes md5: ec364509df5dfd57a4c05e2c410f358f =head1 Changes in DBD-Oracle 1.1427th March 2003 NOTE: OCI 7 and Oraperl will not be supported in future releases. Implemented inserting NULL values into LOB fields u

RE: $dbh->unquote()

2003-03-27 Thread Paul DuBois
At 12:59 -0500 3/27/03, Brian Spindler wrote: Ok, I don't know how its happening either but here is the entire breakdown: MySQL field: longtext Step(1) - Text File is created on unix machine, transferred via FTP to a Windows machine. Step(2) - Perl script reads in the file and parses it grabbing

RE: $dbh->unquote()

2003-03-27 Thread Brian Spindler
Ok, I don't know how its happening either but here is the entire breakdown: MySQL field: longtext Step(1) - Text File is created on unix machine, transferred via FTP to a Windows machine. Step(2) - Perl script reads in the file and parses it grabbing certain lines and inserts them into the datab

RE: $dbh->unquote()

2003-03-27 Thread Paul DuBois
At 12:24 -0500 3/27/03, Brian Spindler wrote: Interesting, in my MySQL database the field is a longtext should I change it to a one of the binary types? That won't make any difference. I don't know how your problem occurred in fact, but here's one way that it *can* occur. Maybe this will shed som

Re: $dbh->unquote()

2003-03-27 Thread shildreth
On 27-Mar-2003 Jeff Zucker wrote: > [EMAIL PROTECTED] wrote: > >>"\n" => "\r\n" in windows env. >> > LOL. How can something be equal to itself plus something else? And the > "windows env" is not a monolithic thing, its behaviour can be modified > by binmode. > > A better way to say it is:

Re: $dbh->unquote()

2003-03-27 Thread Ronald J Kimball
On Thu, Mar 27, 2003 at 08:56:43AM -0800, Jeff Zucker wrote: > However in any environment '\n' is written as a backslash and the letter > n. The OP has apparently somehow stuck his "\n"s inside single quotes > and made them literals. I doubt very much that DBD::mysql::quote() does > that, so

RE: $dbh->unquote()

2003-03-27 Thread Sterin, Ilya (I.)
Yes, I'd try long raw, see if that helps. Also, as Jeff mentioned, try using binmode. Ilya -Original Message- From: Brian Spindler [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 12:24 PM To: 'Sterin, Ilya (I.)'; 'Paul DuBois'; [EMAIL PROTECTED] Subject: RE: $dbh->unquote() In

RE: $dbh->unquote()

2003-03-27 Thread Brian Spindler
Interesting, in my MySQL database the field is a longtext should I change it to a one of the binary types? Brian -Original Message- From: Sterin, Ilya (I.) [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 11:38 AM To: 'Brian Spindler'; 'Paul DuBois'; [EMAIL PROTECTED] Subject: R

Re: $dbh->unquote()

2003-03-27 Thread Ian Harisay
I think the problem is that when you get the info back out of the db it is for some reason coming as a string literal. Meaning it isn't translating your \n. Now if it is coming as a string literal you can simply: ## assume $var a holds your string. $a =~ s/\\n/\n/g; print $a; This can be c

RE: $dbh->unquote()

2003-03-27 Thread Sterin, Ilya (I.)
This depends on what field in the db you are writting to. If it's a raw type or binary field, then you wouldn't have that problem. There might be some conversion going on between the db field, as \n is not a standard carriage return, it's the way Perl interpreter interprets carriage returns on wh

RE: $dbh->unquote()

2003-03-27 Thread Brian Spindler
DBD::mysql::quote() as far as I can tell takes the string and wraps the entire thing in single quotes also taking the carriage returns and making them a backslash and the letter n. Brian -Original Message- From: Jeff Zucker [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 11:57 A

Re: $dbh->unquote()

2003-03-27 Thread Jeff Zucker
[EMAIL PROTECTED] wrote: "\n" => "\r\n" in windows env. LOL. How can something be equal to itself plus something else? And the "windows env" is not a monolithic thing, its behaviour can be modified by binmode. A better way to say it is: "\n" is written as "\015\012" in a windows environment

RE: $dbh->unquote()

2003-03-27 Thread Brian Spindler
The file prints out for example: LINE1\n LINE2\n LINE3\n So the '\n' is printed as if I went print '\n'; and what I want them to do is print carriage returns. Brian -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 11:50 AM To: Brian Spindler

RE: $dbh->unquote()

2003-03-27 Thread Paul DuBois
At 11:33 -0500 3/27/03, Brian Spindler wrote: If printed in a windows environment "\n" is a carriage return. Brian You still haven't said what "as they should" means. You say that \n's don't print as they should, but not what actually happens. Do they just disappear entirely? Do they get turned i

RE: $dbh->unquote()

2003-03-27 Thread shildreth
"\n" => "\r\n" in windows env. On 27-Mar-2003 Brian Spindler wrote: > If printed in a windows environment "\n" is a carriage return. > Brian > > > -Original Message- > From: Paul DuBois [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 27, 2003 11:32 AM > To: Brian Spindler; [EMAIL PRO

RE: $dbh->unquote()

2003-03-27 Thread Brian Spindler
If printed in a windows environment "\n" is a carriage return. Brian -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2003 11:32 AM To: Brian Spindler; [EMAIL PROTECTED] Subject: Re: $dbh->unquote() At 11:19 -0500 3/27/03, Brian Spindler wrote: >H

Re: $dbh->unquote()

2003-03-27 Thread Paul DuBois
At 11:19 -0500 3/27/03, Brian Spindler wrote: Hi guys, gals! I have a pretty big string that I am inserting into MySQL via the $dbh->quote($str) function, this works great however now when I pull the data back out of the database and go to write it to a file the \n characters that were ins

$dbh->unquote()

2003-03-27 Thread Brian Spindler
Hi guys, gals! I have a pretty big string that I am inserting into MySQL via the $dbh->quote($str) function, this works great however now when I pull the data back out of the database and go to write it to a file the \n characters that were inserted by quote are not being written back out

Re: DBD-ODBC Strange Behavior?

2003-03-27 Thread E. Scott Stricker
Strangely enough, splitting the request into 2, first is Use db and second is whatever else still seems to work. Not sure why. Also, problem seems to be confined to scripts run for the DOS prompt. CGI scripts we have still work fine. As far as a workaround, my answer would be go back a couple o

Re: Connection errors - how to debug?

2003-03-27 Thread Eric Frazier
Hi, Thanks for the reply. I don't know for sure, but it doesn't look to me like this is the issue. But it makes me think about things like that, but I am not getting any messages about file descriptors or anything in the /var/log/messages. When I do a netstat or sockstat I see hundreds, but not th

Re: DBD-ODBC Strange Behavior?

2003-03-27 Thread Adam Peterson
is there anyway to get around this? this could case a lot of problems if someone by mistake switched the default database on the system dsn name! --- "E. Scott Stricker" <[EMAIL PROTECTED]> wrote: > Getting the same thing with the newer versions of DBD-ODBC. The generic > behavior is that the

Re: "make test" error for DBI-1.35 on AIX 4.3.3

2003-03-27 Thread Jeremy.Richards
Hi, After reading your response below, I ran "make install" which produced output contained in the attached (I assume I also ignore the error in there). (See attached file: DBI-1.35_make_install.txt) I then tried building DBD::Oracle but the "perl Makefile.PL" command produced the error in the

Word of thanks

2003-03-27 Thread Jeremy.Richards
Thanks very much for that info. The quick response time to my problem was tremendous ! Regards, Jeremy Richards Open Systems Support

Re: "make test" error for DBI-1.35 on AIX 4.3.3

2003-03-27 Thread Tim Bunce
Looks like some process is stuck still using the DBI.so file: ld: 0711-851 SEVERE ERROR: Output file: blib/arch/auto/DBI/DBI.so^M The file is in use and cannot be overwritten.^M make: The error code from the last command is 12. File and kill the process and/or dele