• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 324
  • Last Modified:

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

0
ram27
Asked:
ram27
  • 2
1 Solution
 
ram27Author Commented:
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)
0
 
hieloCommented:
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
0
 
hieloCommented:
This might actually solve your problem:
http://www.codenewsgroups.net/group/microsoft.public.vb.general.discussion/topic17861.aspx

Pay special attention to the post on "26 Nov 2007 6:17 PM"
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now