I've done a select ... into via
VB Code:
SqlCmd = "select LoanNumber, [Date], Status, MSI into #tempLoanStatus " & _ "from MonthlyData " & _ "where Shelf = '" & ShelfToPRocess & "'" & _ "order by LoanNumber, [Date]" Set cmdGetLoanData = New ADODB.Command cmdGetLoanData.ActiveConnection = cnRFCData cmdGetLoanData.CommandTimeout = 0 cmdGetLoanData.CommandText = SqlCmd Set rsLoanTemp = cmdGetLoanData.Execute
and this would seem to work as it takes a few minutes to execute and no errors are returned (not necessarily a good assumption) but the question is: how do i then access the temp table #tempLoanStatus. i need to use the results in other sql selects. i tried to create a recordset via rsLoanTemp.Open etc but I keep getting a timeout error hence the command object




Reply With Quote