Groups | Blog | Home
all groups > sql server (alternate) > may 2004 >

sql server (alternate) : unable to submit more than 8000 characters with stored procedure


carlos.pacheco NO[at]SPAM fct.mces.pt
5/20/2004 4:38:25 PM
Hi all,

I have a internet page written in asp to submit into authors
curriculum vitae publications (title, author, year, etc.).
If the author submit less than 8000 characters it functions OK, but If
the author try's to submit more than 8000 characters the asp page does
not return an error but the text is not saved in the database or,
sometimes, it returned a "Typ mismatch" error.

Here is the sp:

---------------------------------------------------------------------
CREATE PROCEDURE sp_CV_publications
(
@formCommand
nvarchar(255)='process',
@id numeric=null,
@id_person int=null,
@typPubID tinyint= NULL,
@publications text=null
)
AS


if @formCommand='process'
begin

INSERT INTO CV_publications(
idperson,
typPubID,
publications

)
VALUES (
@id_person
@typPubID,
@publications
);
select 1 as status, @@IDENTITY AS insertedID, * FROM
CV_publications WHERE id=@@IDENTITY
end
----------------------------------------------------------------------------


The server is running IIS5 and SqlServer 2000


Erland Sommarskog
5/20/2004 10:40:53 PM
(carlos.pacheco@fct.mces.pt) writes:
[quoted text, click to view]

Not that it applies to this problem, but don't call your procedures
sp_something. sp_ is a prefix reserved for system objects, and SQL
Server first looks in master for these.

I would like to have seen the ASP code, to know how you call the procedure.
Do you use adLongVarchar for the parameter?



--
Erland Sommarskog, SQL Server MVP, sommar@algonet.se

Books Online for SQL Server SP3 at
AddThis Social Bookmark Button