The routine that I am writing is a report. My goal is to make it as self-contained as possible with a minimum of system configuration. So I am using a Connection String instead of a DSN, creating and deleting the DBC as I go.
In most cases I have been able to pare the query down to less than 255 characters. I CANNOT break this one down any smaller and breaking it into separate queries use "select *" instead of listing out the columns is prohibitively bulky.
I CAN make the query a stored procedure in the database. But somehow that seems like bad form and, if I do that wirh all the reports I have to write then it becomes a maintenance issue. But that may be my only out.
Bob
>Have you considered using a remote view?
>
>
>>While I think I can make that work, I prefer not to make the query resident in the database. It may be a last resort solution.
>>
>>>How about creating the query as a SQL-Server stored procedure, and then use SQLEXEC to execute that procedure?
>>>
Database Development Team