rempet
User
 Junior Boarder
| Posts: 10 |   | Karma: 0 |
|
problem with varchar(max) and guid in stored proc
|
|
Posted: 2007/10/17 06:08 |
|
|
|
|
I have a problem with varchar(max) in stored procedure.
I have a procedure with @ERTEK varchar(max) input parameter and @ID uniqueidentifier output parameter and some other input parameters.
Problem: the procedure return Null value. If I change the @ERTEK parameter's type to varchar(1000), the return value is not null.
The procedure:
CREATE PROCEDURE ...
(
@PAR1 VARCHAR(10),
@PAR2 UNIQUEIDENTIFIER,
...
@ERTEK NVARCHAR(MAX),
...
@ID UNIQUEIDENTIFIER OUTPUT
)
AS
BEGIN
SELECT @ID = ID
FROM ...
IF @ID IS NULL
BEGIN
SET @ID = NEWID()
INSERT INTO...
END
ELSE
UPDATE...
END
|
I use D2007, MSSQL 2005, AnyDac 1.12.2
Best regards,
Peter
Post edited by: rempet, at: 2007/10/17 06:09
|
|