Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Avoiding Strange Win32::ODBC Return Values for Integers

by thor (Priest)
on Oct 28, 2005 at 13:57 UTC ( [id://503644]=note: print w/replies, xml ) Need Help??


in reply to Avoiding Strange Win32::ODBC Return Values for Integers (NUL)

Hmm...that's weird. Let's take it back a step, though. What happens if you try to write to a "normal" format (i.e. a text file). Something like what you have commented out in your while loop. That might be illuminating as far as whether it's ODBC giving you bad values, or it's Spreadsheet::WriteExcel interpretting them in some odd-ball way.

A third possibility is that you have to format those cells into which you're putting numeric data to actually be numbers. I seem to remember the S::WE module being fairly smart about that, though...

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

  • Comment on Re: Avoiding Strange Win32::ODBC Return Values for Integers

Replies are listed 'Best First'.
Re^2: Avoiding Strange Win32::ODBC Return Values for Integers
by jonix (Friar) on Oct 28, 2005 at 14:19 UTC
    The output is the same if I just print it - so it is what I get from ODBC already.
    I just checked the SQL Server table properties again - I really do a sum() over a field defined as int.
      So you're saying that you get a 57 with some strange character after it when you just print it as text?

      thor

      Feel the white light, the light within
      Be your own disciple, fan the sparks of will
      For all of us waiting, your kingdom will come

        That is right - I just wrote it to a file to be able to paste it, but pasting did not work from TextPad.
        It tells me: can not copy... containing null (code=0) characters.
        Notepad.exe does not show it nor complain, but also only shows a space when pasting it.

        Update: It looks like 57.00[] while [] denotes the strange last character.

        Thanks,
        jonix

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://503644]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-26 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found