Hello Jeff,
thanks for the reply. I did some additional investigations, and I found the reason. The error occurs, if there was a SqlSetLongBindDatatype used previousely. I save data to parent and child tables, the parent table has a long varchar field. The commit is at the end of all operations. If I commit directly after the long operation, it works fine.
Code: Select all
Call SqlPrepareAndExecute(hSql,'UPDATE MyParentTable SET ... WHERE Id = :nParentId')
...
If SqlPrepare(hSql, 'UPDATE MyParentTable SET MyLongField = :lsLongString WHERE Id = :nParentId')
Call SqlSetLongBindDatatype(1,23)
Call Execute(hSql)
...
Call SqlPrepareAndExecute(hSql,'UPDATE MyChildTable SET ModificationDate = GetDate() WHERE Id = :nId') => SQL Error
Call SqlCommit(hSql)
I have also some trouble reading data from database in two complex select statements which uses sub-selects, if I exceed a number of fields or if I use sub-selects, I get a result set with only empty fields, but other queries with sub-selects and a huge amount of columnns work proper. I can't give you a test case because it only occurs in that special circumstances, and the database is to big to share (>30 gb).
Kind regards
Harald