troubleshooting Question

Varchar Lenght Exceed ..........

Avatar of azhar_sultan
azhar_sultan asked on
Microsoft SQL Server
19 Comments1 Solution716 ViewsLast Modified:
here is my sp

@ProdId varchar (8000)
declare @strSql varchar(8000)
 set @strSql='select * from products where productname in (' + @prodid +')'
Execute ( @strSql)

at the time of calling this procedure from vb6 i dont know how many character go to this procedure
this procedure work fine when the lenght is less than 8000 but when its lenght exceed from 8000 then i get error.

give me solution of my prob.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 19 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros