Since the error messsage is prefixed with SQL Error, this appears to be a file-related problem occuring in the mysqld server. The server, while processing a request, attempts to write a temporary file (yes, its name changes every time, this is the nature of temporary files), and gets an error code from the operating system when trying to do so. According to this and this, the problem is disk space; however, since you are using windows (which has no separate /tmp partitions), and are sure that you have no space problems on your disk (and no strange ile space qute on the c:\Windows\Temp dir), it could be related to that the size of the tmp file would be very large - other seem to have had problems with this too.

What is the query, and the engine used for the database (myisam, innodb, ..) ? Is the query one of those automatically generated by heidisql when you use the Data tab ?
(cf also especially the "ANALYSE TABLE" tip concerning InnoDB in the second post).