M
mharness
Hello,
I'm plucking my head bald trying to figure this one out.
Here's the stored procedure qupdSlide:
UPDATE tblSlides
SET Title = @Title
WHERE (SlideID = @SlideID)
Here's the code that calls it:
Dim cmd As New SqlCommand
Dim prmTitle As New SqlParameter
Dim prmSlideID As New SqlParameter
With prmTitle
.ParameterName = "Title"
.SqlDbType = SqlDbType.NVarChar
.Value = Slide.Title
End With
With prmSlideID
.ParameterName = "SlideID"
.SqlDbType = SqlDbType.Int
.Value = Slide.SlideID
End With
With cmd
.Parameters.Add(prmSlideID)
.Parameters.Add(prmTitle)
.CommandType = CommandType.StoredProcedure
.CommandText = "qupdSlide"
.Connection = Connection()
.Connection.Open()
.ExecuteNonQuery()
.Connection.Close()
End With
and here's the error I get:
SlideId is not a parameter for procedure qupdSlide.
I'll admit that I'm new at this but I've used the same approach with several
other tables and procedures and it works perfectly. I can run the sp in an
access adp and it does what it's supposed to do but it will not run from
asp. Data types all match. Parameters have good values right up to the
point of executing the query. I tried updating any of several other fields
in the table but the error's the same. Transaction log filled up today and
I'm still trying to figure out how to empty it--could that have anything to
do with this error?
Do you see why this won't work?
Thanks,
Mike
I'm plucking my head bald trying to figure this one out.
Here's the stored procedure qupdSlide:
UPDATE tblSlides
SET Title = @Title
WHERE (SlideID = @SlideID)
Here's the code that calls it:
Dim cmd As New SqlCommand
Dim prmTitle As New SqlParameter
Dim prmSlideID As New SqlParameter
With prmTitle
.ParameterName = "Title"
.SqlDbType = SqlDbType.NVarChar
.Value = Slide.Title
End With
With prmSlideID
.ParameterName = "SlideID"
.SqlDbType = SqlDbType.Int
.Value = Slide.SlideID
End With
With cmd
.Parameters.Add(prmSlideID)
.Parameters.Add(prmTitle)
.CommandType = CommandType.StoredProcedure
.CommandText = "qupdSlide"
.Connection = Connection()
.Connection.Open()
.ExecuteNonQuery()
.Connection.Close()
End With
and here's the error I get:
SlideId is not a parameter for procedure qupdSlide.
I'll admit that I'm new at this but I've used the same approach with several
other tables and procedures and it works perfectly. I can run the sp in an
access adp and it does what it's supposed to do but it will not run from
asp. Data types all match. Parameters have good values right up to the
point of executing the query. I tried updating any of several other fields
in the table but the error's the same. Transaction log filled up today and
I'm still trying to figure out how to empty it--could that have anything to
do with this error?
Do you see why this won't work?
Thanks,
Mike