Link to home
Start Free TrialLog in
Avatar of ram27
ram27

asked on

what are the values for second parameter value for CreateParameter in ASP

Hi
i want to call sql server storedproc (myproc) from asp code (classic ASP)
create  PROCEDURE [dbo].[myproc]
(
    @mailid            uniqueidentifier OUTPUT,
    @user_guid         uniqueidentifier,
    @mailtype          integer,
    @toaddress         varchar(128) = NULL,
    @subject           varchar(256) = NULL,
    @Textbody              varchar(MAX) = NULL,
             @std_msgid         int = NULL,
    @att1              varchar(128) = NULL,
    @att2              varchar(128) = NULL,
    @att3              varchar(128) = NULL,
             @HTMLBody           varchar(MAX) = null

)
...
how to pass parameters for thsi
cn.Open "data source name", "userid", "password"
   Set cmd = Server.CreateObject("ADODB.Command")
   Set cmd.ActiveConnection = cn
   cmd.CommandText = "[dbo].[myproc]"
   cmd.CommandType = adCmdStoredProc
what will be value for second parameter for
   cmd.Parameters.Append cmd.CreateParameter("@mailid ",??what is the value ???, _
      adParamReturnValue)
   cmd.Parameters.Append cmd.CreateParameter("@user_guid",???adVarChar??, _
      adParamInput)
      cmd.Parameters.Append cmd.CreateParameter("@user_guid",,adVarChar, _
      adParamInput)
Please let me know

Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

Avatar of ram27
ram27

ASKER

hi
what would be datatype for "uniqueidentifier" defined in stored proc in ASP.
i mean
cmd.Parameters.Append cmd.CreateParameter("@mailid ",??ineed to specify datatype equavelent of uniqueidentifier what is the value ???, _
      adParamReturnValue)
Did you try adGUID?

Refer to the data types here:
http://www.w3schools.com/ado/met_comm_createparameter.asp

Here's  a solution similar to your problem where someone was trying an INPUT parameter:
http://forums.devx.com/archive/index.php/t-46121.html
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial