all groups > sql server programming > july 2005 >
You're in the

sql server programming

group:

Alternatives in order to avoid issues


Alternatives in order to avoid issues Enric
7/20/2005 11:19:12 PM
sql server programming: Dear fellows,

I've got a stored procedure which receives from ASP page a dynamic range of
values (array). In the sp we've put a 'plain varchar' without say to Sql
Server how long it is.

Does anyone know how could we do this easier?

Thanks in advance and regards,



Re: Alternatives in order to avoid issues Madhivanan
7/20/2005 11:24:47 PM
See if this helps you
http://www.sommarskog.se/arrays-in-sql.html

Madhivanan
Re: Alternatives in order to avoid issues Mike Epprecht (SQL MVP)
7/21/2005 12:00:00 AM
From BOL:
"When n is not specified in a data definition or variable declaration
statement, the default length is 1"

If you do not specify, you get a VARCHAR(1). I'd say you would have
problems.

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

[quoted text, click to view]

AddThis Social Bookmark Button