|
 |
asp_databases thread: ado command object not returning output parms
Message #1 by srotondo@h... on Fri, 27 Sep 2002 20:29:18
|
|
my asp program calls a stored procedure via a command object. it should
return values from my database, but it is not. there are no syntax errors
or ado errors. it's just that when i try to response.write one of the
returned parms, nothing shows up.
here's my asp/ado code: (note i've added a couple of comments on
functionality.
thanks for your help!
CODE:
'*****************************************
set adoCmd = Server.CreateObject("ADODB.Command")
adoCmd.ActiveConnection = adoCon
adoCmd.CommandText = "{call procGetArticle(?,?,?,?,?,?,?)}"
adoCmd.Parameters.Append adoCmd.CreateParameter
("pmNewsID",adInteger,adParamInput,4,strNewsID) 'strNewID is the key to
the file. i've checked for the given rec and it's on my database.
adoCmd.Parameters.Append adoCmd.CreateParameter
("pmTitle",adVarChar,adParamOutput,100)
adoCmd.Parameters.Append adoCmd.CreateParameter
("pmAuthor",adVarChar,adParamOutput,100)
adoCmd.Parameters.Append adoCmd.CreateParameter
("pmPosition",adVarChar,adParamOutput,100)
adoCmd.Parameters.Append adoCmd.CreateParameter
("pmLocation",adVarChar,adParamOutput,100)
adoCmd.Parameters.Append adoCmd.CreateParameter
("pmEventDate",adDate,adParamOutput)
adoCmd.Parameters.Append adoCmd.CreateParameter
("pmTextFile",adVarChar,adParamOutput,200)
adoCmd.Execute
if adoCon.Errors.count > 0 then
Response.Write "error!!!"
else
Response.Write "were ok" 'this is the msg that shows up.
end if
Message #2 by "Ken Schaefer" <ken@a...> on Mon, 30 Sep 2002 10:34:17 +1000
|
|
What is inside the stored procedure?
What database are you using?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <srotondo@h...>
Subject: [asp_databases] ado command object not returning output parms
: my asp program calls a stored procedure via a command object. it should
: return values from my database, but it is not. there are no syntax errors
: or ado errors. it's just that when i try to response.write one of the
: returned parms, nothing shows up.
:
: here's my asp/ado code: (note i've added a couple of comments on
: functionality.
:
: thanks for your help!
:
: CODE:
: '*****************************************
: set adoCmd = Server.CreateObject("ADODB.Command")
: adoCmd.ActiveConnection = adoCon
:
: adoCmd.CommandText = "{call procGetArticle(?,?,?,?,?,?,?)}"
:
: adoCmd.Parameters.Append adoCmd.CreateParameter
: ("pmNewsID",adInteger,adParamInput,4,strNewsID) 'strNewID is the key to
: the file. i've checked for the given rec and it's on my database.
: adoCmd.Parameters.Append adoCmd.CreateParameter
: ("pmTitle",adVarChar,adParamOutput,100)
: adoCmd.Parameters.Append adoCmd.CreateParameter
: ("pmAuthor",adVarChar,adParamOutput,100)
: adoCmd.Parameters.Append adoCmd.CreateParameter
: ("pmPosition",adVarChar,adParamOutput,100)
: adoCmd.Parameters.Append adoCmd.CreateParameter
: ("pmLocation",adVarChar,adParamOutput,100)
: adoCmd.Parameters.Append adoCmd.CreateParameter
: ("pmEventDate",adDate,adParamOutput)
: adoCmd.Parameters.Append adoCmd.CreateParameter
: ("pmTextFile",adVarChar,adParamOutput,200)
:
: adoCmd.Execute
: if adoCon.Errors.count > 0 then
: Response.Write "error!!!"
: else
: Response.Write "were ok" 'this is the msg that shows up.
: end if
|
|
 |