[12656] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 65 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 7 17:17:16 1999

Date: Wed, 7 Jul 1999 14:06:22 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 7 Jul 1999     Volume: 9 Number: 65

Today's topics:
    Re: urlencoded standard? <gellyfish@gellyfish.com>
    Re: urlencoded standard? <StefanRieken@SoftHome.net>
        Using ADO to access a SQL Server DB  <dlewright@nuworld.com>
    Re: Using ADO to access a SQL Server DB  <alyciad@c-esystems.com>
    Re: Using ADO to access a SQL Server DB <apollock11@hotmail.com>
    Re: Using ADO to access a SQL Server DB <matt@sergeant.org>
        waitpid equivalent in NT? <cooltekatibm.net>
        Web message board perl script <remove-to-reply__agner@login.dknet.dk>
    Re: Webpages and Perl-Couple of Questions (Larry Rosler)
    Re: Webpages and Perl-Couple of Questions (Abigail)
    Re: Website search using regular expression (Abigail)
    Re: Weird error message -- ever seen? <debot@xs4all.nl>
    Re: Weird error message -- ever seen? (Abigail)
    Re: Whats wrong with this script <gellyfish@gellyfish.com>
        White Camel nominations open (brian d foy)
    Re: White Camel nominations open (Abigail)
    Re: White Camel nominations open <uri@sysarch.com>
    Re: White Camel nominations open (Abigail)
    Re: White Camel nominations open <gellyfish@gellyfish.com>
        whitespace truncation <forddavi@pilot.msu.edu>
    Re: whitespace truncation (Ronald J Kimball)
    Re: whitespace truncation (David Cantrell)
        Win32::ODBC bug. (was Re: Access returns rows, but not  webmuse@my-deja.com
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 6 Jul 1999 21:25:50 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: urlencoded standard?
Message-Id: <7lts8u$ln$1@gellyfish.btinternet.com>

On Tue, 06 Jul 1999 00:34:52 +0200 Stefan Rieken wrote:
> Hi,
> 
> It occurs to me that there is some kind of standard in writing
> urlencoded data. Both Netscape and Internet Explorer do for instance
> encode the "$", while they leave alone the rest of the safe charachters 
> "-" | "_" | "." | "+" .
> 
> This confuses me a little. Which way is "standard"? How "bad" is it to
> do any other way? Is there any real good standard for urlencoded data?

Yes there is a standard it is decribed in rfc1945 which can be found at
<http://www.rfc-editor.org> - if you ever have a question like this that
is always a good place to start to look.

Of course this question has nothing to do with Perl whatsoever and should
have been asked in another newsgroup in the first place.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Wed, 07 Jul 1999 13:55:13 +0200
From: Stefan Rieken <StefanRieken@SoftHome.net>
Subject: Re: urlencoded standard?
Message-Id: <37834021.9C7EC7EA@SoftHome.net>



Jonathan Stowe wrote:

> Of course this question has nothing to do with Perl whatsoever and should
> have been asked in another newsgroup in the first place.
> 
Thanks for answering, anyway. The only other newsgroups I know of where
people should know anything about CGI hasn't been updated on my
newsgroup server for about a month. 

As I stated in another mail (that doesn't seem to have arrived yet), I
really try to be as on-topic as possible. I think it is a good thing to
point people on being off-topic, as long as it's in a kind way (in which
you seem to have succeeded, thanks).

Greets,

Stefan


------------------------------

Date: Tue, 06 Jul 1999 21:42:58 GMT
From: Dorr Lewright <dlewright@nuworld.com>
Subject: Using ADO to access a SQL Server DB 
Message-Id: <37827861.DD49C7D9@nuworld.com>

Does anyone have a Perl script that uses ADO to access a SQL Server
database? Please include all of the necessary code including the
complete connect string.
Please don't beat me up as I have looked in many places for this.

Thanks,
dlewright@nuworld.com



------------------------------

Date: Tue, 6 Jul 1999 15:28:50 -0700
From: "Alycia Dasmann" <alyciad@c-esystems.com>
Subject: Re: Using ADO to access a SQL Server DB 
Message-Id: <378281b3@news1.ltinet.net>

Try using the following connect string replacing the server, db, user,
password.  :

 my $conn=CreateObject OLE "ADODB.Connection" || die "CreateObject: $!";
 my $connect="DRIVER={SQL
SERVER};PWD=;UID=user;SERVER=YOURSERVERNAME;DATABASE=YourDBName";
 $conn->open($connect);

 #-------------- Open Recordset -------------
 my $sql="Select * from tblContacts";
 my $rs=$conn->Execute($sql);

 $rs->Close;
 $conn->Close;

Dorr Lewright <dlewright@nuworld.com> wrote in message
news:37827861.DD49C7D9@nuworld.com...
> Does anyone have a Perl script that uses ADO to access a SQL Server
> database? Please include all of the necessary code including the
> complete connect string.
> Please don't beat me up as I have looked in many places for this.
>
> Thanks,
> dlewright@nuworld.com
>




------------------------------

Date: Tue, 6 Jul 1999 15:27:24 -0700
From: "Alvin Pollock" <apollock11@hotmail.com>
Subject: Re: Using ADO to access a SQL Server DB
Message-Id: <7ltvnn$3t7$1@agate.berkeley.edu>

First try http://www.perlscripters.com/
Lots of examples of PerlScript + ASP + ADO. If you want another
example contact me and I'll send you one.

Alvin Pollock
apollock11@hotmail.com



Dorr Lewright <dlewright@nuworld.com> wrote in message
news:37827861.DD49C7D9@nuworld.com...
> Does anyone have a Perl script that uses ADO to access a SQL Server
> database? Please include all of the necessary code including the
> complete connect string.
> Please don't beat me up as I have looked in many places for this.
>
> Thanks,
> dlewright@nuworld.com
>




------------------------------

Date: Wed, 07 Jul 1999 10:43:31 +0100
From: Matt Sergeant <matt@sergeant.org>
Subject: Re: Using ADO to access a SQL Server DB
Message-Id: <37832143.7441263F@sergeant.org>

Dorr Lewright wrote:
> 
> Does anyone have a Perl script that uses ADO to access a SQL Server
> database? Please include all of the necessary code including the
> complete connect string.
> Please don't beat me up as I have looked in many places for this.

Check out the Perl-Win32-Database FAQ.


------------------------------

Date: Wed, 7 Jul 1999 00:05:15 -0600
From: "No Spam Please" <cooltekatibm.net>
Subject: waitpid equivalent in NT?
Message-Id: <931327518.477.5@news.remarQ.com>

I am trying to convert several perl scripts and need to figure out the
equivalent process of a waitpid.

I understand that NT is different in how it handles processes but wonder if
anyone has had any success in using alternate methods.

Regards
steve
replace at with @ when replying by email ;)




------------------------------

Date: Wed, 07 Jul 1999 14:02:36 +0200
From: Agner Fog <remove-to-reply__agner@login.dknet.dk>
Subject: Web message board perl script
Message-Id: <378341DC.35B69BAB@login.dknet.dk>

Improved web message board software with separate index for each thread:

www.agner.org/websoftware



------------------------------

Date: Tue, 6 Jul 1999 23:15:36 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Webpages and Perl-Couple of Questions
Message-Id: <MPG.11ec904dba247b14989c6c@nntp.hpl.hp.com>

In article <377e5de5.137802298@news.nikoma.de> on Sun, 04 Jul 1999 
05:26:20 GMT, Philip 'Yes, that's my address' Newton 
<nospam.newton@gmx.net> says...
> On Sat, 3 Jul 1999 16:42:06 +0500, "Faisal Nasim"
> <swiftkid@bigfoot.com> wrote:
> 
> >foreach ( param () )
> >{
> >    $ { $_ } = param ( $_ );
> >}
> 
> Can you get that compiled under "use strict"?

No.  But just change

    $ { $_ }

to

    $_ { $_ }

and wonderful things happen.

%_ is a globally defined 'special variable' naming a hash, just as $_ 
and @_ name a scalar and an array.  Though $_ and @_ have special 
semantics, %_ doesn't.  I use it as the Lazy Programmer's way to avoid 
symbolic references without having to declare a global hash to hold the 
variable names.

Patent Pending (or is it Copyright :-) ...

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 7 Jul 1999 01:32:17 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Webpages and Perl-Couple of Questions
Message-Id: <slrn7o5t2s.tch.abigail@alexandra.delanet.com>

Larry Rosler (lr@hpl.hp.com) wrote on MMCXXXVI September MCMXCIII in
<URL:news:MPG.11ec904dba247b14989c6c@nntp.hpl.hp.com>:
$$ 
$$ %_ is a globally defined 'special variable' naming a hash, just as $_ 
$$ and @_ name a scalar and an array.  Though $_ and @_ have special 
$$ semantics, %_ doesn't.  I use it as the Lazy Programmer's way to avoid 
$$ symbolic references without having to declare a global hash to hold the 
$$ variable names.
$$ 
$$ Patent Pending (or is it Copyright :-) ...


BTDTDNGTTS.

%<digits>, including %0, are also excellent hashes. Specially in
combination with regex matches. $1{$1}. :) And then there's %%.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 6 Jul 1999 18:59:59 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Website search using regular expression
Message-Id: <slrn7o563a.tch.abigail@alexandra.delanet.com>

Ashish Kadakia (anonymous@web.remarq.com) wrote on MMCXXXV September
MCMXCIII in <URL:news:931295422.2959@www.remarq.com>:
~~ Hi, is there anysearch engine, anyone knows it, or how I
~~ can make it which searches the URLs via regular expression.
~~ ie... .* will match all the sites
~~ but .*?com will match websites ending com
~~ .*?/download will match all website having download
~~ directory.

And your Perl question is ?


Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: Wed, 07 Jul 1999 00:26:36 +0200
From: Frank de Bot <debot@xs4all.nl>
Subject: Re: Weird error message -- ever seen?
Message-Id: <3782829B.2EDE6DAF@xs4all.nl>

If this message occures at every script I can say the perl is crashed at the
server. You'd better report it to the webserver admistrator (If you are the
administrator you try to reinstall perl)

Rusty Williamson wrote:

> Hi!
>
> A script that normally runs fine got this error out of the blue yesterday:
>
> dynamic linker: /usr/bin/perl5: relocation error: symbol not found:
> Perl_pp_substcont
>
> There seems no correllation between anything in the message and the script.
> Has anyone ever seen this before.  Does anyone know what it means or where I
> can go from here in resolving it?
>
> Thanks,
> Rusty Williamson

--
Contact Information:

                         \\\|///
                       \\  - -  //
                        (  @ @  )
----------------------oOOo-(_)-oOOo--------------------|
| General:                                             |
|                                                      |
| EMAIL: debot@xs4all.nl                               |
|------------------------------------------------------|
| Penpal International                                 |
|                                                      |
| URL: http://www.debot.nl/ppi/  or  http://fly.to/ppi |
| EMAIL: debot@xs4all.nl  or  ppi@debot.nl             |
-------------------------------Oooo---------------------
                        oooO    (   )
                       (   )    ) /
                       \ (     (_/
                        \_)




------------------------------

Date: 6 Jul 1999 19:04:58 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Weird error message -- ever seen?
Message-Id: <slrn7o56ci.tch.abigail@alexandra.delanet.com>

Rusty Williamson (rwilliamson@uno.gers.com) wrote on MMCXXXV September
MCMXCIII in <URL:news:37tg3.439$VX3.21129@news.connectnet.com>:
!! 
!! dynamic linker: /usr/bin/perl5: relocation error: symbol not found:
!! Perl_pp_substcont
!! 
!! There seems no correllation between anything in the message and the script.
!! Has anyone ever seen this before.  Does anyone know what it means or where I
!! can go from here in resolving it?


That sounds like a bug, somewhere. It isn't that the function isn't
defined - it's in pp_clt.c. I suggest rebuilding Perl, and if it
still fails, issue a bug report.



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 6 Jul 1999 20:27:07 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Whats wrong with this script
Message-Id: <7ltoqr$id$1@gellyfish.btinternet.com>

On Tue, 6 Jul 1999 06:21:57 -0400 (EDT) ^şmIRC^ wrote:
> im trying to run this script from www.hypermart.net
> 
> heres a script that converts HTML into PERL or C.  please tell me where
> im going wrong and no errors show up in my error log.
> #!/usr/local/bin/perl -s 
> # 
> # HTML TO CGI CONVERTER                          html2cgi.pl      
> #
> #   Converts an HTML file to either C or Perl code for inclusion in
> #   a CGI script.
> # 
> # Reads STDIN and writes STDOUT 
> #    
> # Switches: 
> # 
> #   -c     = Generate C code. 
> #   -p     = Generate Perl code (default). 
> #   -l     = Number of leading spaces on each line (defaults to 0). 
> #   -m     = Maximum number of characters per print statement (defaults
> to 70).  #   -usage = show summary of options 
> # 

<snip code>

I stopped trying to sort the code out when I realised that these switches
arent used and then realised almost immediately that this was a log of
fuss over nothing:


#!/usr/bin/perl -w

use strict;

my $shebang = '#!/usr/bin/perl -w'; # You might want to change this

my $html = do { local $/; <> };

print <<EOHTML;
$shebang

use strict;
use CGI qw(:standard);

print header;

print <<EOHTML;
EOHTML

print $html,"\nEOHTML\n";

This will read a file from STDIN and wrap it in the minimal code necessary
to make it work in the CGI environment.

There is a far better example by Randal Schwartz from his Web Techniques
column that will change an HTML document into the CGI.pm HTML producing
methods - unfortunately I cant remember the full URL.

But it occurs to me that you are actually trying to run your program
*in* the CGI environment - well it wont work infact neither will mine.

Maybe you ought to explain what you are trying to do if that is the case.

You also might find it more productive to ask in the newsgroup
comp.infosystems.www.authoring.cgi if your question is about CGI.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Tue, 06 Jul 1999 22:51:28 -0400
From: brian@pm.org (brian d foy)
Subject: White Camel nominations open
Message-Id: <brian-ya02408000R0607992251280001@news.panix.com>


Nominate the Perl community's unsung heros for the
first White Camel awards. Three awards--for outstanding
contributions to Perl Advocacy, Perl User Groups, and the
Perl Community--will be awarded at O'Reilly's Perl Conference 3.0
on August 24, 1999. Nominate the folks who have made these
important non-technical contributions to Perl at
http://www.perl.com/whitecamel. All nominations must be in
by August 2. The White Camel awards are sponsored by Perl Mongers,
O'Reilly & Associates, and sourceXchange.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


------------------------------

Date: 6 Jul 1999 23:11:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: White Camel nominations open
Message-Id: <slrn7o5kpv.tch.abigail@alexandra.delanet.com>

brian d foy (brian@pm.org) wrote on MMCXXXVI September MCMXCIII in
<URL:news:brian-ya02408000R0607992251280001@news.panix.com>:
() 
() Nominate the Perl community's unsung heros for the
() first White Camel awards. Three awards--for outstanding
() contributions to Perl Advocacy, Perl User Groups, and the
() Perl Community--will be awarded at O'Reilly's Perl Conference 3.0
() on August 24, 1999.

If I don't post in the group till the conference, and then don't
scare 500 programmers back to visual basic and c++, would that
give me a good chance of winning a white camel? 

Can they be painted pink?



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 07 Jul 1999 00:21:56 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: White Camel nominations open
Message-Id: <x7673xum1n.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@delanet.com> writes:

  A> () Nominate the Perl community's unsung heros for the
  A> () first White Camel awards. Three awards--for outstanding
  A> () contributions to Perl Advocacy, Perl User Groups, and the
  A> () Perl Community--will be awarded at O'Reilly's Perl Conference 3.0
  A> () on August 24, 1999.

  A> If I don't post in the group till the conference, and then don't
  A> scare 500 programmers back to visual basic and c++, would that
  A> give me a good chance of winning a white camel? 

i think you do a service by scaring away those vb lusers.

  A> Can they be painted pink?

i don't think that is your color. what season are you?

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


------------------------------

Date: 6 Jul 1999 23:41:30 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: White Camel nominations open
Message-Id: <slrn7o5mj5.tch.abigail@alexandra.delanet.com>

Uri Guttman (uri@sysarch.com) wrote on MMCXXXVI September MCMXCIII in
<URL:news:x7673xum1n.fsf@home.sysarch.com>:
\\ >>>>> "A" == Abigail  <abigail@delanet.com> writes:
\\ 
\\   [ About white camels and such ]
\\ 
\\   A> Can they be painted pink?
\\ 
\\ i don't think that is your color. what season are you?


Friday.


Abigail
-- 
package Z;use overload'""'=>sub{$b++?Hacker:Another};
sub TIESCALAR{bless\my$y=>Z}sub FETCH{$a++?Perl:Just}
$,=$";my$x=tie+my$y=>Z;print$y,$x,$y,$x,"\n";#Abigail


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 7 Jul 1999 09:43:04 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: White Camel nominations open
Message-Id: <37831318@newsread3.dircon.co.uk>

Abigail <abigail@delanet.com> wrote:
> brian d foy (brian@pm.org) wrote on MMCXXXVI September MCMXCIII in
> <URL:news:brian-ya02408000R0607992251280001@news.panix.com>:
> () 
> () Nominate the Perl community's unsung heros for the
> () first White Camel awards. Three awards--for outstanding
> () contributions to Perl Advocacy, Perl User Groups, and the
> () Perl Community--will be awarded at O'Reilly's Perl Conference 3.0
> () on August 24, 1999.
> 
> If I don't post in the group till the conference, and then don't
> scare 500 programmers back to visual basic and c++, would that
> give me a good chance of winning a white camel? 
> 

Actually I think that continuing in that behaviour might be a reason for
a nomination - after all we have to have something to scare newbies with:
'If you dont read the FAQ the Abigail will get you' 

;-}

/J\
-- 
"I must call a man in - I want to get felt laid down in the loft" -
Graham Norton


------------------------------

Date: Tue, 6 Jul 1999 23:40:20 -0400
From: "Davis Ford" <forddavi@pilot.msu.edu>
Subject: whitespace truncation
Message-Id: <7lui4e$ftr$1@msunews.cl.msu.edu>

Hello:

I have a CGI script which reads in the following variables:

$artist
$title

and passes them through the hidden  input type to another HTML page, which
then passes them to another perl program which then proceeds to open an
existing HTML file and appends the $artist : $title as a link on that HTML
document.  The whole process works fine.  The problem I am having is that
the program truncates the string whenever a whitespace character happens.

This is a typical scenario:

HTML form:

enter artist:  Joe Shmoe
enter title: Joe's Product

<user hits the submit button>

dynamically creates this HTML document:

this is what you submitted:

Joe Shmoe

Joe's Product

Do you want to keep this?  <Submit> button

<user hits submit button>

 ...program opens current existing HTML document called users.html and
appends $artist and $title to the end as a hyperlink.

Now when I visit users.html, the hyperlink truncates to:

Joe

Joe's

Here is my code for the "submit" program (minus most of the non-relevant
code)

use CGI;

$query = new CGI;
if ($query->param()){
    $artist = $query->param('artist');
    $title= $query->title('title');
}

open (HTML file...for writing here...)

print INDATA $artist
print INDATA $title

 ...I have excluded all the HTML-Perl code...this system works, it just
truncates after a whitespace in the string.  Can anyone explain why?  I'd be
happy to explain further if anyone could help me out.

Thanks in advance,

Davis




------------------------------

Date: Wed, 7 Jul 1999 00:37:36 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: whitespace truncation
Message-Id: <1dujqxd.1wbg2btbxo8ltN@p158.block1.tc4.state.ma.tiac.com>

Davis Ford <forddavi@pilot.msu.edu> wrote:

> and passes them through the hidden  input type to another HTML page, which
> then passes them to another perl program which then proceeds to open an
> existing HTML file and appends the $artist : $title as a link on that HTML
> document.  The whole process works fine.  The problem I am having is that
> the program truncates the string whenever a whitespace character happens.

Oh no, not this question again...  I do hope that you are smarter than
the last person who asked this question.

This is not a Perl problem, this is an HTML problem.  When your
attribute values contain whitespace, you must put quotes around them.
(In fact, you should have quotes when the value contains any character
not in [A-Za-z0-9.-].)


Instead of:

<INPUT TYPE=hidden NAME=name VALUE=Joe Smith>


You should have:

<INPUT TYPE=hidden NAME=name VALUE="Joe Smith">


I hope that is clear.


-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


------------------------------

Date: Wed, 07 Jul 1999 09:40:47 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: whitespace truncation
Message-Id: <37831ff8.83527676@news.insnet.net>

On Tue, 6 Jul 1999 23:40:20 -0400, "Davis Ford"
<forddavi@pilot.msu.edu> said:

>...I have excluded all the HTML-Perl code...this system works, it just
>truncates after a whitespace in the string.  Can anyone explain why?

It truncates on whitespace because that's what you're telling it to
do.

Please learn HTML.  Please learn how to figure out which is the
correct newsgroup for your questions.  Please learn how to read FAQs.
Please learn how to use search engines.

[Copying newsgroup posts to me by mail is considered rude]

-- 
David Cantrell, part-time Unix/perl/SQL/java techie
                full-time chef/musician/homebrewer
                http://www.ThePentagon.com/NukeEmUp


------------------------------

Date: Wed, 07 Jul 1999 02:17:03 GMT
From: webmuse@my-deja.com
Subject: Win32::ODBC bug. (was Re: Access returns rows, but not Win32::ODBC?)
Message-Id: <7ludan$vp6$1@nnrp1.deja.com>

I hate to use that subject without being able to confirm
the bug is in Win32::ODBC, but we have exhausted every
other channel I can think of, and all things point to a
bug in Win32::ODBC (or in how it works with the new MDAC
drivers).

We have now updated everything to the latest MDAC drivers: 2.1 SP2.

We have worked on this problem for 5 or 6 days now... it seems to
be only related to checking for null fields -- but only in ODBC
requests through Perl/Win32. The queries work fine when they are
run directly in Access!

We had a text field where we were requesting all records
with (thefield = null OR thefield = ''). After installing
SQL Server 7, and MDAC updates, the query no longer worked.
We suspected a corrupted database, and spent most of the time
working on this aspect of it. We have dismissed this notion
after I completely exported all tables to CSV files, fixed
several screwed up index fields, and re-imported the CSV
files into a new database. Also, keep in mind the queries
work fine in Access, just not when we try them in Perl CGI
scripts through Win32::ODBC.

Then today I tried a few new things. One thing was to change
all the records that had null in that field to have empty string:

UPDATE TheTable SET thefield = '' WHERE thefield = null;

Then I changed our query to only look for records where
thefield = '', and THIS WORKED! I thought we had a workaround
to tide us over until our migration to SQL Server could be
completed (I'm Assuming SQL server will not have this problem).

Well then this evening we happened across another query we're
using (one of many) that request records based on looking for
date fields with null values. This no longer works correctly
(again, ONLY THROUGH PERL/ODBC! It works fine within Access.)

We are out of ideas on how to debug/workaround this problem.
No one believes this could be a problem with Win32::ODBC because
it has been available for so long, but I suspect it is a
problem between the Win32::ODBC driver and the new MDAC drivers.
I want to re-iterate that we have been using Win32::ODBC for
several years now. The only thing that changed on our server
was that we installed SQL Server 7 and the latest MDAC updates.

Any suggestions would be appreciated so that I don't
jump out my window. It's only one story up, but I could be
badly bruised in the fall!

-thomas

In article <7lg1dp$ghg$1@nnrp1.deja.com>,
  webmuse@my-deja.com wrote:
> Hello,
>
> Windows NT 4, IIS 4, win32 Perl build 316, latest ver of Win32::ODBC.
>
> I've been using Win32::ODBC for a long time, and I thought I
> had figured out all of it's tricks and traps. For example,
> a few months ago I discovered why some of my select queries
> weren't always working (large memo fields need the buffer increased).
>
> We installed SQL Server 7 on our server yesterday, but haven't
> fiddled with it yet. We just wanted to put it on and make sure
> everything remains stable. For the time being, we're still using
> Access97 for our database work.
>
> We use a ton of CGI scripts that rely on Win32::ODBC. As far
> as I know (and have seen), they are all still working fine. But we
> have this one CGI/ODBC script that has started behaving strangely. I
> have tried all the debugging tricks I know with Win32::ODBC, using
> Run() instead of Sql(), DumpData(), MoreResults(), RowCount(),
> Error(), etc...
>
> Here's the problem. I have a SELECT ... INNER JOIN statement
> that combines two tables, and spits out some records based on the
> WHERE clause (which operates on only one table). There is rarely
> a time when this particular query doesn't return at least one
> record, so when it started to do that, we suspected a problem.
> (This happened right after our upgrade to SQL Server 7.)
>
> I checked it with Run(), and sure enough it executes without
> an error... just no results. I copied the SQL statement, and
> pasted it into a query window in Access. I hit the execute
> button, and it returns 4 or 5 results!
>
> The only thing I know of that can keep Win32::ODBC from displaying
> records when they are displayed OK in Access is if the buffer is
> too low. But none of these records have large memo fields!
>
> On a whim, I tried changing the buffer to 200KB, but it didn't
> do any good. Any ideas? Do I have a corrupt database maybe? The
> only thing that makes sense is some driver was changed when SQL
> Server 7 was installed... ?
>
> Thanks,
> Thomas
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 65
************************************


home help back first fref pref prev next nref lref last post