Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Max Length of VARCHAR

Author  Topic 

juicyapple
Posting Yak Master

176 Posts

Posted - 2008-02-21 : 03:03:02
Hi, I have declare a varchar to keep the exception message and write it into table. But I guess that because of the datatype size limit, the exception message cannot be written...Please advise. Any other way to keep the exception message in log for tracibility purpose?

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-21 : 04:03:03
Can you post the code you used?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-02-21 : 06:23:32
DECLARE @MyVariable VARCHAR(8000)



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-02-21 : 07:58:05
Or:

DECLARE @MyVariable VARCHAR(MAX)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-21 : 08:07:11
quote:
Originally posted by RickD

Or:

DECLARE @MyVariable VARCHAR(MAX) If you use SQL Server 2005 or higher version




Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -