Groups | Blog | Home
all groups > inetserver asp general > october 2004 >

inetserver asp general : command problem


Bob Barrows [MVP]
10/30/2004 11:27:24 AM
[quoted text, click to view]
This always means that the ADO constants you are using are not defined. You
could #include the adovbs.inc file, but that is not very efficient. See
http://www.aspfaq.com/show.asp?id=2112 for a better way to provide the
definitions of the contants.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Savas Ates
10/30/2004 6:13:04 PM
it doesnt work still

Arguments are of the wrong type, are out of acceptable range, or ...


<!--#include file="conn.asp"-->
<%
Set cmd=server.CreateObject("ADODB.Command")
cmd.CommandType=4
cmd.ActiveConnection=baglantim
cmd.CommandText = "st_myfriends"
cmd.Parameters.Append
cmd.CreateParameter("@UserId", adNumeric, adParamInput, ,50)
Set objRS = objCommand.Execute
%>

cmd.CommandType=4
or
cmd.CommandType=adCmdStoredProc

both gives same error

Savas Ates
10/30/2004 6:43:21 PM
<!--METADATA TYPE="typelib"
NAME="Microsoft ActiveX Data Objects 2.8 Library"
UUID="{2A75196C-D9EB-4129-B803-931327F72D5C}"
VERSION="2.8"-->
<!--#include file="conn.asp"-->

<%
Set cmd=server.CreateObject("ADODB.Command")
cmd.ActiveConnection=baglantim
cmd.CommandType=4
Set Parm = cmd.CreateParameter("@userid" , adNumeric, adParamInput ,0,10)

cmd.Parameters("@userid").Value= 10

cmd.Parameters.Append Parm

cmd.CommandText = "st_myfriends"
cmd.Execute

'adCmdText
cmd.CommandType = adCmdText
cmd.CommandText = "exec st_Insert @userid = 10"
cmd.Execute
%>

it gives
ADODB.Command (0x800A0CC1)
item cannot be found in db it says

im sure it exists coz
set rsmyfriends=baglantim.execute ("st_myfriends @userid='10"'")

this works




Jeff Dillon
11/1/2004 10:39:20 AM
What about adNumeric and adParamInput??

Jeff
[quoted text, click to view]

AddThis Social Bookmark Button