OK this is what I am aiming to do.

I would like to pass in a single string that contains the stored procedure and any required parameters into the ado.command.text parameter.



I have wrapped the ADO object in VB.
I am using Oracle OLE DB provider.

This is an example of a stored proc I use.
-------------------------------------------------------------------

procedure spGetTestPullDown(pMemberStatus in number,
CurRef out typeRefCur,
v_errcode out integer,
v_errmesg out varchar2)

is
begin
v_errcode :=0;
open CurRef for
select member_status,
definition
from member_status
where member_status>pMemberStatus;


exception
when others then
v_errcode :=SQLCODE;
v_errmesg :=SQLERRM;

end spGetTestPullDown;

-------------------------------------------------------------------


So at the moment I pass in the 3 parameters one at a time through ADO, which is ok and everything works.

So things are a little like this if I am for example working with ASP.

set oConn = server.createobject("ADODB.Connection")
oConn.open sConnectionsting, sUser, sPassword

set oCMD = server.createobject("ADODB.Command")
oCMD.activeConnection = oConn

oCMD.CommandType = adCmdStoredProc
oCMD.CommandText = <<STORED PROC HERE>>


'ADD THE PARAMETERS HERE AS REQUIRED
oCMD.Parameters.Append <<STUFF GOES HERE>>

'RETURN ITEMS IN RECORDSET
set oRS = oCMD.exexcute

-------------------------------------------------------

All of the above works very well and good.


However this is the tricky bit.

I would like to insert the stored procedure and the parameters in one string to the connection object. ie the command text.

I have seen examples of how to do this but they are all using table arrays ( I really don't want to use table arrays)

the string they pass in look a little like the following

"{call packperson.allperson({resultset 9, ssn, fname, lname})}"

Here is a link to the article.

[url]http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q229/9/19.asp&NoWebContent=1[url]


Thanks

youeee