whenever I tried to retrrieve a value using stored proc fro code behind using COM class ,Im totally failed because the error comes like this
"article id does not belong to the table"
I debug and I find the instead of id name is coming..
Just check the code
--------- Dim B(5), p As Object B(0) = Trim(Session("UserId")) B(1) = Trim(TxtArtistName.Text) qry2 = "select * from articlemaster where articlename='" & Trim(TxtArticle.Text) & "'and categoryid='" & Trim(Drpcategory.SelectedValue) & "'"
dtab = SQL_Helper.GetTable(qry1) If dtab.Rows.Count <> 0 Then p = "Insert_Artist" num = dtab.Rows(0).Item("articleid") ' = dtab.Rows(0).Item("articleid") B(2) = num SQL_Helper.ExecuteProcedure(B, p) end if
--------------- and the stored proc is
CREATE PROCEDURE Insert_Artist @artistid varchar(50), @artistname varchar(50), @articleid integer
AS INSERT INTO ArtistMaster (artistid,artistname,articleid ) VALUES (@artistid,@artistname,@articleid) GO
|
| Author: krishna chaitanya 10 Jul 2008 | Member Level: Silver | Rating: Points: 1 |
hi i think that in ur ArtistMaster table does not having the field name 'articleid'
if it is there u check that u have given some space while calling field name 'article id ' ones u check that.
|