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("@mail id ",??what is the value ???, _
adParamReturnValue)
cmd.Parameters.Append cmd.CreateParameter("@user _guid",??? adVarChar? ?, _
adParamInput)
cmd.Parameters.Append cmd.CreateParameter("@user _guid",,ad VarChar, _
adParamInput)
Please let me know
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
Set cmd.ActiveConnection = cn
cmd.CommandText = "[dbo].[myproc]"
cmd.CommandType = adCmdStoredProc
what will be value for second parameter for
cmd.Parameters.Append cmd.CreateParameter("@mail
adParamReturnValue)
cmd.Parameters.Append cmd.CreateParameter("@user
adParamInput)
cmd.Parameters.Append cmd.CreateParameter("@user
adParamInput)
Please let me know
ASKER
hi
what would be datatype for "uniqueidentifier" defined in stored proc in ASP.
i mean
cmd.Parameters.Append cmd.CreateParameter("@mail id ",??ineed to specify datatype equavelent of uniqueidentifier what is the value ???, _
adParamReturnValue)
what would be datatype for "uniqueidentifier" defined in stored proc in ASP.
i mean
cmd.Parameters.Append cmd.CreateParameter("@mail
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://support.microsoft.com/kb/165156
Solved Solition
https://www.experts-exchange.com/questions/22011233/Classic-ASP-createParameter-throws-Invalid-Character-error.html