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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 text data type

Author  Topic 

jamiematmca
Starting Member

3 Posts

Posted - 2004-07-05 : 06:51:25
I am developing a .net application.
I need to pass a string of size more than 8000 characters in a stored a stored procedure.
I have declared it as a text variable. Now I have to split it into so many rows and store it in the database.
I could not use TXTPTR method since it is not a column of a table.
Does any body know the solution for this problem?


Regards,
jamie

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-05 : 12:11:18
If you are splitting it into rows anyway, then why are you using the text datatype? Put it into a VARCHAR field with a rownumber field.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jamiematmca
Starting Member

3 Posts

Posted - 2004-07-06 : 00:29:23
no i can use varchar.
since the number of rows to be updated is dynamic i put all the rows into a single string with delimiters. That string may contain more that 8000 characters so i could in declare it as a varchar variable.



Thank you,
jamie
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-07-06 : 00:42:56
You need to rewrite your application. The insert and update statements should be split out correctly by the application, before the call is made to SQL Server.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jamiematmca
Starting Member

3 Posts

Posted - 2004-07-06 : 01:21:38
Insertion itself may have more than 8000 characters.
Even I spit up insert and update statements in the front end
I may have to send string with more than 8000 characters.


Thank you,
jamie
Go to Top of Page
   

- Advertisement -