If your procedure is as simple as this one the you can use:
create table Employees
(emp_id int identity(1,1)
, emp_name char(30))
CREATE PROC GetEmployees
SELECT emp_id, emp_name
insert into Employees (emp_name)
ltrim(rtrim(substring(text, charindex(' ', text, charindex('select' , text)), charindex('from', text) - charindex(' ', text,
charindex('select' , text)))))
where object_name(id) = 'GetEmployees'
drop proc GetEmployees
drop table Employees
Otherwise you should keep in mind that system table sysomments for stored procedures with more than 4000 characters has more than
one row (one row
for each 4000 chars).
You could try the firs method but if you don't want to get all of the records first execute SQL statement "set rowcount 1"
with your command object (ADODB.Command) and then execute the stored procedure which shoul return only one record.
RS(0).name and RS(1).name
"Maher K. Al-Jendasi" <fm> wrote in message news:phx.gbl...
> number of fields in the recordset: