By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,884 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,884 IT Pros & Developers. It's quick & easy.

Inserting into a text field in SQL Server 2000

P: 1
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.

Thanks!
Dec 28 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

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