This time it’s just annoying, and I have a workaround.  But, annoying IS annoying.

Progress DB on the back end server.  PHP/Apache using ODBC with unixODBC and DataDirect drivers for Progress.

For whatever reason, I cannot odbc_execute this SQL: “select count(*) from table”.  It errors out with a 158 SQL State 9 every time.  I CAN, however, use isql to test the command and it works fine.  I can use PHP/Apache to run similar commands against MySQL tables.  There’s just something about that combination that isn’t allowing the count() to get through the unixODBC/DataDirect layers.  Not only that, but I’ve never been able to get the LC_MESSAGES worked out for these DataDirect ODBC drivers, so I can’t get the REAL message that goes with that 158 to tell me what’s wrong.

Very frustrating.  For now, until I have time to work on the issue more, I just read in the rows one at a time and increment a counter.  Not exactly the most efficient way of doing things, but it’s getting the job done for now.

Wow, it’s been a long time since my Oracle DBA days.  I’m getting deeper and deeper into my latest project that includes a lot of MySQL DB work, and I need to spend some time looking into things that I long forgot about, like foreign keys, constraints, and indexes.

What fun!  I love this stuff!

© 2010 Virtual Adept Suffusion WordPress theme by Sayontan Sinha