Missing paramater
am 08.07.2005 18:07:34 von Jims
I have a Win 2003 server. I am running an .asp page that works fine on a
development server.
The production server will not display the proper data. This .asp page
calls a SQL stored procedure that is passed a value thru
Set cmdStored = Server.CreateObject("ADODB.command")
Set param = cmdStored.CreateParameter("@PassedValue", adInteger,
adParamInput, , variable)
cnnStoredProc.GetDataStoredProc param, rs
The stored procedure is not receiving the parameter according to the SQL
server trace file. I think the Production server is missing some library to
create the ADO command object which prevents the command object from being
created. The variable that should be passed has a value but that value is
not passed to the SQL Stored Procedure.
All the code works great on test Win 2003 server....not on Production 2003
server. How can I correct this problem?
Thanks a bunch!
Re: Missing paramater
am 08.07.2005 19:18:48 von reb01501
JimS wrote:
> I have a Win 2003 server. I am running an .asp page that works fine
> on a development server.
> The production server will not display the proper data. This .asp
> page calls a SQL stored procedure that is passed a value thru
>
> Set cmdStored = Server.CreateObject("ADODB.command")
> Set param = cmdStored.CreateParameter("@PassedValue", adInteger,
> adParamInput, , variable)
> cnnStoredProc.GetDataStoredProc param, rs
Wait. Why are you creating a Command object when you are using the
stored-procedure-as-connection-method technique to call the procedure?
Assuming "GetDataStoredProc" is the name of the stored procedure, all you
need to do is:
cnnStoredProc.GetDataStoredProc variable, rs
>
> The stored procedure is not receiving the parameter according to the
> SQL server trace file. I think the Production server is missing some
> library to create the ADO command object which prevents the command
> object from being created. The variable that should be passed has a
> value but that value is not passed to the SQL Stored Procedure.
>
> All the code works great on test Win 2003 server....not on Production
> 2003 server. How can I correct this problem?
> Thanks a bunch!
I think I see what is happening. On your test server, it's acting as if this
was your code:
cnnStoredProc.GetDataStoredProc param.value, rs
On the production server, it is not using the value property.
Anyways, forget about creating the Command object when using this technique
to run your procedure. You don't need it.
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"
Re: Missing paramater
am 09.07.2005 00:00:51 von Jims
Thanks Bob
I am not sure just what the issue is as your suggestion didnt solve this
problem. I know that what you have said makes perfect sense so I must be
overlooking something.
Thanks!
"Bob Barrows [MVP]" wrote in message
news:u%23OZbE%23gFHA.3692@TK2MSFTNGP09.phx.gbl...
JimS wrote:
> I have a Win 2003 server. I am running an .asp page that works fine
> on a development server.
> The production server will not display the proper data. This .asp
> page calls a SQL stored procedure that is passed a value thru
>
> Set cmdStored = Server.CreateObject("ADODB.command")
> Set param = cmdStored.CreateParameter("@PassedValue", adInteger,
> adParamInput, , variable)
> cnnStoredProc.GetDataStoredProc param, rs
Wait. Why are you creating a Command object when you are using the
stored-procedure-as-connection-method technique to call the procedure?
Assuming "GetDataStoredProc" is the name of the stored procedure, all you
need to do is:
cnnStoredProc.GetDataStoredProc variable, rs
>
> The stored procedure is not receiving the parameter according to the
> SQL server trace file. I think the Production server is missing some
> library to create the ADO command object which prevents the command
> object from being created. The variable that should be passed has a
> value but that value is not passed to the SQL Stored Procedure.
>
> All the code works great on test Win 2003 server....not on Production
> 2003 server. How can I correct this problem?
> Thanks a bunch!
I think I see what is happening. On your test server, it's acting as if this
was your code:
cnnStoredProc.GetDataStoredProc param.value, rs
On the production server, it is not using the value property.
Anyways, forget about creating the Command object when using this technique
to run your procedure. You don't need it.
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"
Re: Missing paramater
am 09.07.2005 01:07:07 von reb01501
Well, show me how to reproduce the symptom and I might be able to help. For
starters, show the revised code that still leads to the symptom. To really
help me get to the bottom of it, show the "CREATE PROCEDURE" statement, at
least the part before the "AS" keyword.
Bob Barrows
JimS wrote:
> Thanks Bob
> I am not sure just what the issue is as your suggestion didnt solve
> this problem. I know that what you have said makes perfect sense so
> I must be overlooking something.
>
> Thanks!
>
>
>
> "Bob Barrows [MVP]" wrote in message
> news:u%23OZbE%23gFHA.3692@TK2MSFTNGP09.phx.gbl...
> JimS wrote:
>> I have a Win 2003 server. I am running an .asp page that works fine
>> on a development server.
>> The production server will not display the proper data. This .asp
>> page calls a SQL stored procedure that is passed a value thru
>>
>> Set cmdStored = Server.CreateObject("ADODB.command")
>> Set param = cmdStored.CreateParameter("@PassedValue", adInteger,
>> adParamInput, , variable)
>> cnnStoredProc.GetDataStoredProc param, rs
>
>
> Wait. Why are you creating a Command object when you are using the
> stored-procedure-as-connection-method technique to call the procedure?
> Assuming "GetDataStoredProc" is the name of the stored procedure, all
> you need to do is:
>
> cnnStoredProc.GetDataStoredProc variable, rs
>
>>
>> The stored procedure is not receiving the parameter according to the
>> SQL server trace file. I think the Production server is missing some
>> library to create the ADO command object which prevents the command
>> object from being created. The variable that should be passed has a
>> value but that value is not passed to the SQL Stored Procedure.
>>
>> All the code works great on test Win 2003 server....not on Production
>> 2003 server. How can I correct this problem?
>> Thanks a bunch!
>
> I think I see what is happening. On your test server, it's acting as
> if this was your code:
>
> cnnStoredProc.GetDataStoredProc param.value, rs
>
> On the production server, it is not using the value property.
>
> Anyways, forget about creating the Command object when using this
> technique to run your procedure. You don't need it.
>
> 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"