When
TMSConnection.OpenDataSets is used for the first time and the BeforeOpen event of a TMSQuery tries to modify the query text, the modified query is not executed, from the second time on OpenDataSets  is called, the modified query is executed instead. I will email a sample project.
			
									
									
						bug on TMSConnection.OpenDataSets
Re: bug on TMSConnection.OpenDataSets
We have received your sample and reproduced the described behavior. We will notify you about the results as any are available.