T-SQL CTE + classic asp - which CommandType to use?

thibautmarchal

New Member
I have a CTE statement. When I try to execute in with classic asp the parameter is not replaced correctly:\[code\]Set cmd=Server.CreateObject("ADODB.Command")cmd.ActiveConnection = objConnectioncmd.CommandText = " my CTE is here"cmd.CommandType = adCmdText'adCmdUnspecified,adCmdText,adCmdTable,adCmdStoredProc,adCmdUnknown,adCmdFile,adCmdTableDirectSet objParam = cmd.CreateParameter(, adBigInt , adParamInput ,8,CLng(MyParameter))cmd.Parameters.Append objParam\[/code\]When I get the final statement the "?" is not replace in the statement and it gives me error.I try with each command type but no results.
 
Back
Top