in reply to Re: Need DBI/ODBC advice.
in thread Need DBI/ODBC advice.

Yes mje, you certainly did. For the future benefit of others, here's my response that adds some additional details.

That's exactly what the problem was, sorta. I wasn't using a DSN, but I had specified the Regional=Yes; setting in my connection string.

dbi:ODBC:Driver={SQL Server}; Server=%server; Database=%db; Regional=Yes;

vs

dbi:ODBC:Driver={SQL Server}; Server=%server; Database=%db; Regional=No;

Knowing that the DSN had that option (I don't get to interact with our server, our server guy does) made me rethink the purpose of the Regional setting. Both Perl and PHP were using the same connection string which explains why both languages were doing that.

I turned it off and thousands of queries went from completely broken and failing to 100% working.

Thank you so much!

Replies are listed 'Best First'.
Re^3: Need DBI/ODBC advice.
by Your Mother (Archbishop) on Aug 11, 2010 at 23:55 UTC

    Well... that's a little irritating. In the CB I asked you, and re-asked you, to try to do a brand new connection without cutting and pasting the connection info to see what happened. In the CB, and in this post, all you shared was "dbi:ODBC:Driver={SQL Server}." If you'd shown the whole string, I would have--and probably others too--said, "Try it without the Regional setting." :(

      Yes, I fully agree and understand where I went wrong. I'm quite embarrassed. I had -wrongly- thought that the Regional setting meant something else, something that made the connection work, since I tried it earlier and didn't have a negative effect. That attempt must have correlated with something else that made the connection work instead, coincidentally. Thinking it was necessary, but not relevant to the problem, I didn't include it, just like I did not include the name of my server. Honestly, when I did try your suggestion, I just retyped it exactly as it was, since I thought Regional was important. Lesson learned though. Always post more rather than less.