Name of Parameter must be the same??? 
Author Message
 Name of Parameter must be the same???

This seems to be...impossible to me.  I have a stored procedure that takes two parameters as follow:

CREATE proc isp_get_site_property
(


)
--PROD with encryption
AS
BEGIN
    -----
END

In my ASPx coding, the VB Script contains the following code.

MyConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
MyCommand = New SqlCommand("isp_get_site_property", MyConnection)

MyCommand.CommandType = CommandType.StoredProcedure






I still don't believe it!  Why the heck I have to know the exact name of the parameter declared in a stored procedure in order to use it?  Does that mean that I have to match also the upper/lower case if the stored procedure happens to be on a case sensitive database?

Note that this does not happen in ASP.  It only happens in ASP.Net.  AM I MISSING SOMETHING HERE?  OR THAT IS THE WAY IT HAS TO BE?



Tue, 13 Jul 2004 03:04:20 GMT  
 Name of Parameter must be the same???

What happens if you convert

to

MyCommand.Parameters.Add(New SqlParameter("SiteId", SqlDbType.Int,4))


Joe


  This seems to be...impossible to me.  I have a stored procedure that takes two parameters as follow:

  CREATE proc isp_get_site_property
  (


  )
  --PROD with encryption
  AS
  BEGIN
      -----
  END

  In my ASPx coding, the VB Script contains the following code.

  MyConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
  MyCommand = New SqlCommand("isp_get_site_property", MyConnection)

  MyCommand.CommandType = CommandType.StoredProcedure






  I still don't believe it!  Why the heck I have to know the exact name of the parameter declared in a stored procedure in order to use it?  Does that mean that I have to match also the upper/lower case if the stored procedure happens to be on a case sensitive database?

  Note that this does not happen in ASP.  It only happens in ASP.Net.  AM I MISSING SOMETHING HERE?  OR THAT IS THE WAY IT HAS TO BE?



Tue, 13 Jul 2004 03:14:29 GMT  
 Name of Parameter must be the same???
ADO.Net seems to require exact parameters.  I always have to provide the
correct parameter name.


This seems to be...impossible to me.  I have a stored procedure that takes
two parameters as follow:

CREATE proc isp_get_site_property
(


)
--PROD with encryption
AS
BEGIN
    -----
END

In my ASPx coding, the VB Script contains the following code.

MyConnection = New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
MyCommand = New SqlCommand("isp_get_site_property", MyConnection)
MyCommand.CommandType = CommandType.StoredProcedure


SqlDbType.NChar,1))





I still don't believe it!  Why the heck I have to know the exact name of the
parameter declared in a stored procedure in order to use it?  Does that mean
that I have to match also the upper/lower case if the stored procedure
happens to be on a case sensitive database?

Note that this does not happen in ASP.  It only happens in ASP.Net.  AM I
MISSING SOMETHING HERE?  OR THAT IS THE WAY IT HAS TO BE?



Tue, 13 Jul 2004 04:58:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to get the login Name of the Remote machine, I am having the host name

2. Parameter query w/ parameter specifying field name?

3. Please tell me what I am doing wrong - DAO parameter Append Query :(

4. How to know the sub name I am into

5. I am trying to update a record, i am not using data control

6. I am learning VB.NET and am wondering....

7. I am trying to update a record, i am not using data control

8. Name and type parameter

9. Passing Parameters as field names

10. Passing name of field as query parameter

11. Named parameters in SQL- SQLDataAdapter vs. OleDBDataAdapter

12. field name used in parameter query?

 

 
Powered by phpBB® Forum Software