ADO SQL query in VB6 (sp6) too long! Truncated while executed.
Posted on 2005-04-20
I am in a middle of a project where I access through ADO to a MS Access database (later after testing phase to MS SQL server).
Untill now everything was just fine, but now I experienced problems in on of my procedures, where I exectute quite a large, complex SELECT command which returns then a simple recordset with just two fields. The query has heaps of joins and tables connected.
The query is not over 64 k long which I thought is the limit. It is some 700 - 1000 chars long.
Now when I execute it, I get nothing in the recordset as the query somehow is truncated within this procedure. (when I debug the mySQL which is the argument for the execute it is not complete!!!!)
I tried to delete some WHERE conditions, shortened the query a bit and it worked again. But I need all those conditions.
I do not want to go to the database designer and rename all tables and fields so that they have just 2-3 characters as it will loose its logic for later programmer. Is there some other way how to get rid of this misbehaviour or am I missing some important declaration issue?
Or is it just MS access issue? Shall I switch directly to MS SQL? I am missing the wysiwyg query analyser there... :o)