lcSql = "SELECT * INTO #temp FROM Northwind.dbo.products" ? SqlExec(lnConn, lcSql ) lcSql = "SELECT * FROM #temp" ? SqlExec(lnConn, lcSql, "aaa")>it returns a -1 when we try to query from the temp table "...ODBC SQL Server Invalid object name '#ccustno'"