Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I'm not saying there are no situations where a type should be specified (in fact the faq I pointed to you at illustrates one).

You look to be using two different ODBC drivers (or at least two different versions). You could find one needs the overriding and the other does not. We cannot tell that without seeing the log.

The biggest problem with SQLDescribeParam (what DBD::ODBC uses to find the parmeter types out) is that the ODBC driver has to rearrange your SQL to find the column types and sometimes it can get this wrong i.e., some sql statements can work, and some can fail. DBD::ODBC tries very hard to get around this.

My point about all your data is a string, is that as far as DBD::ODBC is concerned it is a string - it is bound with a SQL_VARCHAR or SQL_WVARCHAR. The binding type you pass to bind_param overrides the type passed to SQLBindParameter telling the driver what to convert it to - there is a subtle difference.

If you can reproduce the issue you found with I've encountered a situation where Perl didn't know that the incoming insert was a string, and thought it was an integer I would love to see it as that doesn't sound at all right to me.

I assumed you were running on windows so the set command would be issued in a command shell (followed by running your perl program) and would tell DBD::ODBC to send all trace output to x.log. If you are on Unix it would be "export DBI_TRACE=DBD=x.log". I'd very much like to see your trace output for the original problem you outlined (with the parameter types as you first had them).

In reply to Re^3: DBI/ODBC error: "Optional feature not implemented (SQL-HYC00)" by mje
in thread DBI/ODBC error: "Optional feature not implemented (SQL-HYC00)" by HelenCr

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (6)
    As of 2018-04-25 15:29 GMT
    Find Nodes?
      Voting Booth?