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

Posted on 2009-12-17
Last Modified: 2012-05-08
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 ???, _
   cmd.Parameters.Append cmd.CreateParameter("@user_guid",???adVarChar??, _
      cmd.Parameters.Append cmd.CreateParameter("@user_guid",,adVarChar, _
Please let me know

Question by:ram27
    LVL 18

    Expert Comment

    by:Rajar Ahmed

    Author Comment

    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 ???, _
    LVL 82

    Expert Comment

    Did you try adGUID?

    Refer to the data types here:

    Here's  a solution similar to your problem where someone was trying an INPUT parameter:
    LVL 82

    Accepted Solution

    This might actually solve your problem:

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now