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
 SQL Server Development (2000)
 Limiting a string to 255 char in a SProc

Author  Topic 

DougFord99
Starting Member

10 Posts

Posted - 2000-12-30 : 14:29:56
I am passing a string of characters into a SProc from ASP. The string can be anywhere from 0 characters to ? (The string is entered into a form by the user and there are no restrictions on the length of data entered into the form field. I need the SProc to add the string to a keyword table (keywordid int,keyword varchar(255),keywordtypeid int). Each field in the keyword table is limited to 255 characters, but the keywords passed from ASP can exceed 255 characters. How do I take the string and test it for length, if it's longer than 255 characters break it up into 255 character strings and then insert the string(s) into the database as individual records? Once the string is broken into smaller, manageable strings and added to the database, how do I identify which string goes first when it is retrieved from the database and displayed in a web page for editing or viewing at a later date?

Thanks for your time!

Doug Ford

P.S. I am hoping to add this function to an existing SProc that is already over 100 lines long!



Doug Ford
MCSE,MCT
   

- Advertisement -