This question is locked. New answers and comments are not allowed.
I am using Telerik's ORM...
This stored procedure does not save the data, it seems to be a problem with the VARBINARY. I am passing a byte[] to it, but then it doesn't work. If I send this parameter as NULL it works.
Here is my procedure, which works just fine executing directly on SQLServer.
What am I doing wrong? Isn't VARBINARY a byte[] ?
This stored procedure does not save the data, it seems to be a problem with the VARBINARY. I am passing a byte[] to it, but then it doesn't work. If I send this parameter as NULL it works.
"QP_AddCommunity ?, ?, ?, ?, ?, ?", "VARCHAR Name, VARCHAR Description, VARBINARY Picture, INTEGER Owner, INTEGER Venue, INTEGER ID"Here is my procedure, which works just fine executing directly on SQLServer.
USE [redimob]GOSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[QP_AddCommunity] @Name VARCHAR(120), @Description VARCHAR(MAX), @Picture VARBINARY(MAX), @Owner INTEGER, @Venue INTEGER, @ID INTEGER ASBEGIN SET NOCOUNT ON; IF(SELECT COUNT(*) FROM QT_Community WHERE ID = @ID) = 0 INSERT INTO QT_Community(Name, [Description], Picture, [Owner], Venue) VALUES(@Name, @Description, @Picture, @Owner, @Venue); ELSE UPDATE QT_Community SET Name = @Name, [Description] = @Description, Picture = @Picture, [Owner] = @Owner, Venue = @Venue WHERE ID = @ID; SELECT * FROM QT_Community WHERE ID = @@IDENTITY; ENDWhat am I doing wrong? Isn't VARBINARY a byte[] ?