471,596 Members | 1,505 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,596 software developers and data experts.

Inserting into a text field in SQL Server 2000

Hi - my problem is as follows: I'm writing an ASP.Net 2.0 app with C#. From the app, I call a stored procedure that updates some data in the app's database (SQL Server 2000). This stored procedure then declares and assigns a value to a variable of type nvarchar(4000) and calls a 2nd stored procedure, passing it, among other things, the newly created variable. The 2nd stored procedure performs some updates to a different SQL Server 2000 database, one which comes with a 3rd party app we're using. The variable that's passed to the 2nd stored procedure is supposed to be inserted into a text field in a table in the 3rd party database. If I run the stored procedure(s) from Query Analyzer, there's no problem. When the sp's run from my .Net app, though, the text field doesn't get inserted if it's longer than about 90 characters. This happens whether I try to perform the insert with an INSERT, a WRITETEXT or an UPDATETEXT statement. The INSERT statement isn't failing because it inserts more than this one variable; it succesfully creates a new record and inserts various other variable values into various other fields (not of type text). But the text field in the new record always shows blank if it's over 90 characters long. Since the variable is created in the 1st sp, I don't think this is a problem with my .Net app (which, according to the debugger, is passing the 1st sp's parameters correctly), but I'm wondering if there may be a SQL setting that's different between the .Net framework and what's native to Query Analyzer. I've set TEXTSIZE to 2GB in both sp's, with no difference in result. Are there any other settings that could affect how much text can be put into a text field? Also, is there a way I can step through these sp's as they run to see what the sp's think this variable value is as it's running? I'm stumped.

Dec 28 '06 #1
0 1755

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Andrew Banks | last post: by
6 posts views Thread by fniles | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.