This is what SQL Server Books On Line for SQL Server 2000 says about Select INTO- it is trying to create a new table but you already have the table in existence. You want something like "INSERT into foo values (select * from foo2)"
I am also confused why you would want to worry about ordering the results when you are just pushing them into a table.
Finally- if you are not returning any results for use by your application, using a recordset to execute a stored procedure just creates overhead that you don't need. You can execute SQL Server stored procedures in VB as a method of a connection. Something like this:
Code:
dim cn as adodb.connection
set cn = new adodb.connection
cn.connectionstring="foofaafoo"
cn.open
cn.stored_procedure_name
There are lots of ways to do it- that's my favorite. Select Into documentation below. I'd really recommend you use the books online that should be with your Enterprise Manager. They offer lots of help for the database side of things.
INTO Clause
Creates a new table and inserts the resulting rows from the query into it.The user executing a SELECT statement with the INTO clause must have CREATE TABLE permission in the destination
database. SELECT...INTO cannot be used with the COMPUTE. For more information, see Transactions and Explicit Transactions.
You can use SELECT...INTO to create an identical table definition (different table name) with no data by having a FALSE condition in the WHERE clause.
Syntax
[ INTO new_table ]
Arguments
new_table
Specifies the name of a new table to be created, based on the columns in the select list and the rows chosen by the WHERE clause. The format of new_table is determined by evaluating the expressions in the select list. The columns in new_table are created in the order specified by the select list. Each column in new_table has the same name, data type, and value as the corresponding expression in the select list.
When a computed column is included in the select list, the corresponding column in the new table is not a computed column. The values in the new column are the values that were computed at the time SELECT...INTO was executed.
In this release of SQL Server, the select into/bulkcopy database option has no effect on whether you can create a permanent table with SELECT INTO. The amount of logging for certain bulk operations, including SELECT INTO, depends on the recovery model in effect for the database. For more information, see Using Recovery Models.
In previous releases, creating a permanent table with SELECT INTO was allowed only if select into/bulkcopy was set.
select into/bulkcopy is available for backward compatibility purposes, but may not be supported in future releases. Refer to the Recovery Models and Backward Compatibility and ALTER DATABASE topics for more information.