Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can I Send a Text Parameter To Stored Procudur

Status
Not open for further replies.

Shahroozj

Programmer
Aug 19, 2002
9
IR
Dear Friends

Could you please help me to send a text parameter to stored procuder ?
i am using the following code by it doesn't work :

Set tmpParam= Cmd.CreateParameter("@Text",200,1,,MyText)
Cmd.Parameters.Append tmpParam

Please attention that I don't want to pass a varchar or char data type, I want to pass text data type.

Thanks
 
how about

Set tmpParam= Cmd.CreateParameter("@Text",201,1,len(MyText),MyText)
Cmd.Parameters.Append tmpParam codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
 
I had loads of trouble trying to add parameters, but i finally got it working like this.

-------------------------------------
dim objConn,objCmd

set objConn = server.CreateObject(&quot;ADODB.connection&quot;)
objConn.Open (Conn_string)

set objCmd = server.CreateObject(&quot;ADODB.command&quot;)
objCmd.CommandText = &quot;my_proc&quot;
objCmd.CommandType = 4
set objCmd.ActiveConnection = objConn

objCmd.Parameters(&quot;@param1&quot;).Value = test1

objCmd.Execute
----------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top