CREATE PROCEDURE test @cName nText OUTPUT, @bBit as bit, @iResult int OUTPUT AS Set @iResult = 10 GOactually come to think of it I'm not sure how SET an nTEXT value to be used as an output parameter since you can't assign nText - you can only query for it, but SQL Server supports this (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create_4hk5.asp) if anybody knows how to set this let me know. I'm doing this for some generic code so it needs to work with any type hence the question.
FUNCTION ADOStoredProcedure() SYS(3101,65001) LOCAL oConn as ADODB.Connection oConn = CREATEOBJECT("ADODB.Connection") oConn.ConnectionString = THIS.cAdoConnectionString oConn.Open() LOCAL oCommand as ADODB.Command oCommand = CREATEOBJECT("ADODB.Command") oCommand.CommandType= 4 && Stored Proc oCommand.ActiveConnection = oConn oCommand.CommandText = "TEST" && Stored Proc name *** Or wrappered LOCAL oParameter as ADODB.Parameter oParameter = CREATEOBJECT("ADODB.Parameter") oParameter.Type= 203 && adVarWChar oParameter.Value = "English" oParameter.Size = 90000000 oParameter.Direction = 3 && Fails with 3 but works with 1 oCommand.Parameters.Append(oParameter) *this.AdoAddParameter(oCommand,"English","Name","OUT",203) this.AdoAddParameter(oCommand,.t.,"BitParm") this.AdoAddParameter(oCommand,0,"nResult","OUT") lnAffected=0 ? oCommand.Execute(@lnAffected,,128) && No result set *** Gets unspecified error SYS(3101,0) RETURNAdoAddParameter() is just a wrapper around the Parameter object to simplify adding parameters. I use the parm object explictly for the nText parm to make it obvious what's being set.