Click here to get back home

Error when connecting to database using Win32::ODBC

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Error when connecting to database using Win32::ODBC madan 06-09-2006
Get Chitika Premium
Posted by madan on June 9, 2006, 9:26 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by David Squire on June 9, 2006, 9:30 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
Re: Error when connecting to database using Win32::ODBC June 9, 2006, 9:44 am
Still Error when connecting to database using Win32::ODBC June 9, 2006, 9:46 am
Error connecting to remote database April 16, 2007, 9:03 am
[OT] connecting to MS SQL on a different computer (DBD::ODBC) September 13, 2005, 8:36 pm
Dave Roth's site (Win32::AdminMisc, Win32::ODBC, etc.) not available. December 22, 2005, 7:38 am
Connecting to a specific database using sybperl January 19, 2007, 5:26 pm
SQLite - problem connecting to database (or doing a select) November 30, 2004, 5:27 pm
Using the DBI to connect to an Oracle server w/o connecting to a database December 12, 2007, 5:00 pm
Confusion of Win32::ODBC under CygWin. Please help... August 22, 2004, 5:03 am
Catalog() in Win32::ODBC for MySQL August 27, 2006, 1:57 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap