Unsolved qodbc3 unable to execute statement unknown data type 0x00
It seems each single line of code related to this driver is gonna take one month to debug.
Well. After having spent probably one month fixing a crazy issue in libqsqlodbc.so that was due to the Gentoo build system, I finally managed to get some meaningful data from my db connection.
Now, however, I can't even "SELECT singleField FROM SomeTable", because the driver seems unable to understand such a complex query.
QODBCResult::exec: Unable to execute statement: "[FreeTDS][SQL Server]La secuencia del protocolo de llamada a procedimiento remoto (RPC) de la secuencia de datos tabular (TDS) entrante es incorrecta. Parámetro 1 (\"\"): el tipo de datos 0x00 es desconocido."
Which in LC_ALL=C means something like: "QODBCResult::exec: Unable to execute statement: "[FreeTDS][SQL Server]The protocol for remote procedure call (RPC) of the incoming tabular data stream (TDS) is incorrect. Parameter 1 (""): data type 0x00 is unknown."
I can't even start to imagine what will happen when I'll introduce some joins and unions in the middle of that. This is not being a pleasant trip. I am quite bored of wasting my time. I've used several other drivers in the past and nothing ever compared to this odbcrap thing at all.
Things I have tried: many variants of string type, from qstring to plain text. I know it's not that anyway because to my surpirse I managed to run this other query without problems:
UPDATE Articulos SET BloqueoAlbaranVenta=-1 WHERE CodigoArticulo='TXT'
That one worked, heh, at least I can put stuff into tables, that's nice if I don't care about not being able to retrieve it.
I also tried to configure both, odbc*.ini and freetds.conf for tds protocol 7.3 (which seems to be for mssql 2008, the one I am being forced to use). I also tested 8, but the freetds home page says 8 is a dope and it is interpreted as 7.1.
Connecting to the database works, updating tables works, select doesn't work. I have tried * instead of field names, nonsense of course. But this is getting a bit exasperating.
And now, I'll better forget about this for a couple hours.
If anyone can suggest something, please, bear with me and go on, any idea will be appreciated.
I updated freetds from 0.91 (gentoo stable) to 1.0 (unstable which got added only a few days ago). Now I can use SELECT. Fingers crossed.