G
GTN170777
Hi there,
I'm hoping this is the place to submit this, as really I am looking to
resolve the issue before the data is sent to the database.
I have a website, with a textarea, that stores data in an nvarchar(4000)
field, the insert is done via a stored procedure. The data is sent as HTML
Encoded.
This works fine when data is manually entered, however if the user enters
the data by copying and pasting from Word, Notepad, PDF, etc the data is
entered ok, but then doesn't display properly.
The problem seems to be the use of the tab key in the associated program,
for instance -
The data from word looks like this -
"• To hold a Degree with a significant "
The data held on the database then looks like this -
"• To hold a Degree"
Please note the gap between ":" and "To" this doesn't appear to be a space
as it is to big.
The data that is then displayed is -
"•aU"
If i manually remove the gap I get the following -
"•To hold a Degree with a significant " with no gap
Obviously i can't manually do this for every entry, and i deally I still
want to keep the structure of the text, i.e paragraphs.
I think the problem is around ordered and unordered lists from Word etc, and
the tab space between the bullet and first letter, is there anyway to clear
both the un/ordered list and tab space before submitting the data?
I'm using MS SQL 2000
My stored procedure looks like this -
CREATE PROCEDURE NormalAdvert
@EmployeeId int,
@SiteID int,
@ClientId INT,
@JobTitle nvarchar(50),
@Description nvarchar(4000),
@Payrate nvarchar(50),
@location nvarchar(50),
@category nvarchar(50),
@employmenttype nvarchar(50),
@reference nvarchar(50),
@startdate nvarchar(50)
AS
Declare @NewID INT
INSERT INTO dbo.JBAdvert (JBASiteID, JBAEmployeeID, JBAClientID, JBATitle,
JBADescription, JBAPayRate, JBALocation, JBACategory, JBAEmplymentType,
JBAReference, JBAStartDate)
VALUES (@SiteID, @EmployeeId, @ClientId, @JobTitle, @Description, @Payrate,
@location, @category, @employmenttype, @reference, @startdate)
Thank you
I'm hoping this is the place to submit this, as really I am looking to
resolve the issue before the data is sent to the database.
I have a website, with a textarea, that stores data in an nvarchar(4000)
field, the insert is done via a stored procedure. The data is sent as HTML
Encoded.
This works fine when data is manually entered, however if the user enters
the data by copying and pasting from Word, Notepad, PDF, etc the data is
entered ok, but then doesn't display properly.
The problem seems to be the use of the tab key in the associated program,
for instance -
The data from word looks like this -
"• To hold a Degree with a significant "
The data held on the database then looks like this -
"• To hold a Degree"
Please note the gap between ":" and "To" this doesn't appear to be a space
as it is to big.
The data that is then displayed is -
"•aU"
If i manually remove the gap I get the following -
"•To hold a Degree with a significant " with no gap
Obviously i can't manually do this for every entry, and i deally I still
want to keep the structure of the text, i.e paragraphs.
I think the problem is around ordered and unordered lists from Word etc, and
the tab space between the bullet and first letter, is there anyway to clear
both the un/ordered list and tab space before submitting the data?
I'm using MS SQL 2000
My stored procedure looks like this -
CREATE PROCEDURE NormalAdvert
@EmployeeId int,
@SiteID int,
@ClientId INT,
@JobTitle nvarchar(50),
@Description nvarchar(4000),
@Payrate nvarchar(50),
@location nvarchar(50),
@category nvarchar(50),
@employmenttype nvarchar(50),
@reference nvarchar(50),
@startdate nvarchar(50)
AS
Declare @NewID INT
INSERT INTO dbo.JBAdvert (JBASiteID, JBAEmployeeID, JBAClientID, JBATitle,
JBADescription, JBAPayRate, JBALocation, JBACategory, JBAEmplymentType,
JBAReference, JBAStartDate)
VALUES (@SiteID, @EmployeeId, @ClientId, @JobTitle, @Description, @Payrate,
@location, @category, @employmenttype, @reference, @startdate)
Thank you