I am trying to add an image to a table... to do that, I understand I need a TEXTPTR, which is what I'm trying to get here...
I have the following code:
// now find the record in the table
Int32 textPtr = 0;
string findTextPtr = "SELECT @textPtr = TEXTPTR(BookImage) FROM tBooks WHERE BookNbr = '" + tbBookNbr.Text + "'";
SqlCommand cmd = new SqlCommand(findTextPtr, bookConn);
SqlParameter parm = new SqlParameter("@textPtr", SqlDbType.Image, 16, "BookImage");
for which I get the following error:
Parameterized Query '(@textPtr image)SELECT @textPtr = TEXTPTR(BookImage) FROM tBooks' expects parameter @textPtr, which was not supplied.
How do I fix this?