Hi all,
I tried the ASP .NET forum with no luck on this one. Maybe someone
here will know the answer.
I have an old ASP .NET 1.1 application that I haven't had time to
rebuild with .NET 2.0. No changes have been made to the application
or
the SQL Server the application uses. I have a web form where users
can
type multiple lines of text, and it is entered into an SQL database
(SQL 2000 Enterprise) into a column with a datatype of "text".
Recently (it seems out of nowhere), If my users enter a carriage
return into the webform, it becomes a question mark in the sql
database. It's really a bit funny, but also annoying, lol. Does
anyone
have any idea why this might be happening?
To clarify. I'm typing text into a multiline textbox. For every place
I hit the return key, it is converted into a question mark in SQL.
I'm
using standard .net sql insert commands, and I don't parse or modify
the text string in anyway. The question marks show whether I load the
data back into my webform, or even if I do a SQL query via Query
Analyzer. I'm stumped.
Thanks so much!Can you post an example insert string (e.g. from the debug window of your
app)? Does it still produce ?s if you paste that string into Query
Analyzer, and execute it manually? If so, take the string, and do this:
DECLARE @.str NVARCHAR(MAX);
SET @.str = 'INSERT string here...';
DECLARE @.i INT;
SET @.i = 1;
WHILE @.i <= LEN(@.str)
BEGIN
PRINT ASCII(SUBSTRING(@.str, @.i, 1));
SET @.i = @.i + 1;
END
My guess is that .NET is injecting non-printing characters and/or not
producing correct CR/LF pairs.
<mattdaddym@.gmail.com> wrote in message
news:79ba1e43-dadf-4551-b6e5-a810cfeaf231@.i3g2000hsf.googlegroups.com...
> Hi all,
> I tried the ASP .NET forum with no luck on this one. Maybe someone
> here will know the answer.
> I have an old ASP .NET 1.1 application that I haven't had time to
> rebuild with .NET 2.0. No changes have been made to the application
> or
> the SQL Server the application uses. I have a web form where users
> can
> type multiple lines of text, and it is entered into an SQL database
> (SQL 2000 Enterprise) into a column with a datatype of "text".
> Recently (it seems out of nowhere), If my users enter a carriage
> return into the webform, it becomes a question mark in the sql
> database. It's really a bit funny, but also annoying, lol. Does
> anyone
> have any idea why this might be happening?
>
> To clarify. I'm typing text into a multiline textbox. For every place
> I hit the return key, it is converted into a question mark in SQL.
> I'm
> using standard .net sql insert commands, and I don't parse or modify
> the text string in anyway. The question marks show whether I load the
> data back into my webform, or even if I do a SQL query via Query
> Analyzer. I'm stumped.
>
> Thanks so much!
No comments:
Post a Comment