Delphi 2.0 / SQL 6.5 upgrade problem

I have reciently upgraded to MS SQL 6.0 to 6.5 and a run time error with
SQL Pass Thru has developed. I am writing to see if any one else has had
this experience. The program creates temporary tables (using the SQL
Server ##filename syntax). The temp file can be modified ok, but when it
is used in a join (Select A.field1,A.field2,B.field1 from TableA A,
##filename B where A.field1 = B.field1) I get an error 'Invalid use of
keyword Token ##filename'.

Note: There is a hint that this is a syntax error, but when this run time
SQL command is copied and pasted into ISQL or the Explorer's SQL it runs fine.

Any ideas or suggestions are appreciated.

Dave Stoker
University of California, Davis