dbTalk Databases Forums  

Help: 900 byte limit on stored procedure parameter?

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Help: 900 byte limit on stored procedure parameter? in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ZRexRider
 
Posts: n/a

Default Help: 900 byte limit on stored procedure parameter? - 04-07-2006 , 08:16 AM






Hi,

I have a .NET application that I want to save the Config.EXE contents
to my SQL database for remote review/testing. This config file is
3700+ bytes long. I created a field in one of my tables with a VARCHAR
4800 and then created a stored procedure that receives a parameter
(also VARCHAR(4800).

However it fails to write anything if the length of the value that I
pass is anything greater than 900. If I pass exactly 900 characters or
less - the data is written to the field. If I pass 901 characters I
get nothing.

I'm suspicious since it is exactly 900. I seriously doubt it's some
limitation of MS-SQL so I need a nudge in the right direction.

Thanks


Reply With Quote
  #2  
Old   
SQL
 
Posts: n/a

Default Re: Help: 900 byte limit on stored procedure parameter? - 04-07-2006 , 08:35 AM






You probably have an index on that column, an index can not exceed 900
bytes


Denis the SQL Menace
http://sqlservercode.blogspot.com/


Reply With Quote
  #3  
Old   
ZRexRider
 
Posts: n/a

Default Re: Help: 900 byte limit on stored procedure parameter? - 04-07-2006 , 09:24 AM



Thanks Denis - you had my hopes up but nope - this field is not an
index.

I am able to cut and paste any size into this field through SQL
Enterprise Manager . It's just when I try to pass a chunk of data over
900 bytes through a strored procedure parameter.

I hate to build a direct SQL Update into my application but ......


Reply With Quote
  #4  
Old   
Tony Rogerson
 
Posts: n/a

Default Re: 900 byte limit on stored procedure parameter? - 04-07-2006 , 10:12 AM



Please post the stored procedure and the full CREATE TABLE definition -
including indexes, constraints etc...

Tony

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials

"ZRexRider" <jerryg (AT) ptd (DOT) net> wrote

Quote:
Hi,

I have a .NET application that I want to save the Config.EXE contents
to my SQL database for remote review/testing. This config file is
3700+ bytes long. I created a field in one of my tables with a VARCHAR
4800 and then created a stored procedure that receives a parameter
(also VARCHAR(4800).

However it fails to write anything if the length of the value that I
pass is anything greater than 900. If I pass exactly 900 characters or
less - the data is written to the field. If I pass 901 characters I
get nothing.

I'm suspicious since it is exactly 900. I seriously doubt it's some
limitation of MS-SQL so I need a nudge in the right direction.

Thanks




Reply With Quote
  #5  
Old   
ZRexRider
 
Posts: n/a

Default Re: 900 byte limit on stored procedure parameter? - 04-07-2006 , 10:34 AM



Thanks Tony...

I appreciate your help. Just as I was about to do that however .....
gulp... what I failed to mention was I was trying to view these 900+
bytes usining Visual Studio.NET Server Explorer. Although Sever
explorer refuses to display ANYTHING in the column when there are 900+
bytes MS SQL Enterprise Manager does.

In other words - the data is there but just looks like it's not there
when using VisualStudio to view it.

This is an odd limitation but it appears that my table is designed ok
and my stored procedure was working just fine.

If I learn anything more I will repost to this thread.


Reply With Quote
  #6  
Old   
DickChristoph
 
Posts: n/a

Default Re: Help: 900 byte limit on stored procedure parameter? - 04-07-2006 , 03:02 PM



Hi

Have you checked the length of the parameter defined in the .Net
application?

--
-Dick Christoph
"ZRexRider" <jerryg (AT) ptd (DOT) net> wrote

Quote:
Thanks Denis - you had my hopes up but nope - this field is not an
index.

I am able to cut and paste any size into this field through SQL
Enterprise Manager . It's just when I try to pass a chunk of data over
900 bytes through a strored procedure parameter.

I hate to build a direct SQL Update into my application but ......




Reply With Quote
  #7  
Old   
ZRexRider
 
Posts: n/a

Default Re: Help: 900 byte limit on stored procedure parameter? - 04-10-2006 , 07:59 PM



The parameters are fine. As I said earlier - everthing in my code and
stored procedures are working perfectly.

The problem was, for some odd reason when you use Visual Studio to view
the table it shows a blank field but if you look at the exact same
field using SQL Server Enterprise you see that the data really is
there.


So the "issue" turns out to be - Microsoft Visual Studio 2003 will not
display the contents of a varchar field that has more than 900 bytes.
And in my case, I tried to fix everything else!!


DickChristoph wrote:
Quote:
Hi

Have you checked the length of the parameter defined in the .Net
application?

--
-Dick Christoph
"ZRexRider" <jerryg (AT) ptd (DOT) net> wrote in message
news:1144419858.910381.155540 (AT) g10g2000cwb (DOT) googlegroups.com...
Thanks Denis - you had my hopes up but nope - this field is not an
index.

I am able to cut and paste any size into this field through SQL
Enterprise Manager . It's just when I try to pass a chunk of data over
900 bytes through a strored procedure parameter.

I hate to build a direct SQL Update into my application but ......



Reply With Quote
  #8  
Old   
ZRexRider
 
Posts: n/a

Default Re: Help: 900 byte limit on stored procedure parameter? - 04-10-2006 , 08:04 PM



Here's a thread from another guy who pulled his hair out over this...
FUN!

http://groups.google.com/group/micro...770e1d6617279d


Reply With Quote
  #9  
Old   
Liang Zhang
 
Posts: n/a

Default Re: Help: 900 byte limit on stored procedure parameter? - 04-20-2006 , 09:43 PM



Yeah, I also found this problem of visual studio some time.

"ZRexRider" <jerryg (AT) ptd (DOT) net> wrote

Quote:
The parameters are fine. As I said earlier - everthing in my code and
stored procedures are working perfectly.

The problem was, for some odd reason when you use Visual Studio to view
the table it shows a blank field but if you look at the exact same
field using SQL Server Enterprise you see that the data really is
there.


So the "issue" turns out to be - Microsoft Visual Studio 2003 will not
display the contents of a varchar field that has more than 900 bytes.
And in my case, I tried to fix everything else!!


DickChristoph wrote:
Hi

Have you checked the length of the parameter defined in the .Net
application?

--
-Dick Christoph
"ZRexRider" <jerryg (AT) ptd (DOT) net> wrote in message
news:1144419858.910381.155540 (AT) g10g2000cwb (DOT) googlegroups.com...
Thanks Denis - you had my hopes up but nope - this field is not an
index.

I am able to cut and paste any size into this field through SQL
Enterprise Manager . It's just when I try to pass a chunk of data over
900 bytes through a strored procedure parameter.

I hate to build a direct SQL Update into my application but ......





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.