5 Replies Latest reply: Jan 11, 2012 5:10 AM by fscherie-Oracle RSS

    Pro*C: long queries causing ORA-900 invalid sql

    904515
      I've been converting our project to Visual Studio 2010, and everything seemed to be building fine. However now that everything is compiled, certain SQL select statements are failing with "Invalid sql" error (ORA-900). I'm using the 11.2 instant client for compiling and running the application.

      Most queries work, but I've determined that the error only occurs for queries that are long enough for Pro*C to send one part to sqlbuft() and the other into sqlstm.stmt.
      I've compared the c++ files generated by pro*c to the old ones, and they are identical in this regard. I've also set VS2010 to compile my app with the v90 toolset (ie, to use vs2008 compiler) since 2010 isn't officially supported with Pro*C to no avail.

      I'm really at a loss as to what the problem could be, and I hope someone's seen this before.