I have a temp table created via ADO in vb6, & want to set the record source of an ADO Data control to point to this file.

I have set the record string for the data control, at design time, to point to tempdb & at run time set the record source to the temp table:

Me.Adodc1.CommandType = adCmdText
strSql = "select * from #GridData "
Me.Adodc1.RecordSource = strSql

when I define this as the source for a data grid:

Set Me.TDBGrid1.DataSource = Me.Adodc1

I get the error: Invalid object name '#GridData'

Any advice out there on how I should be doing this?

(I have had this working for permanent files)