RE: How to save html tags at SQL Server?
From: Ian Suttle (IanSuttle_at_discussions.microsoft.com)
Date: 12/10/04
- Next message: Curt_C [MVP]: "Re: update record in access"
- Previous message: dkode8_at_gmail.com: "Re: How to save html tags at SQL Server?"
- In reply to: Dexter: "How to save html tags at SQL Server?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Dec 2004 12:07:05 -0800
Dexter,
What error is being generated? How are you currently trying to do the
insert? Are you attempting to execute a string? Are you using a stored
procedure? If you are executing a string, you may be experiencing errors
related to characters such as a single quote that interrupt the SQL string.
It would be safer for you to use the SqlCommand object and define a parameter
with a specified type such as SqlDbType.Text or SqlDbType.VarChar (depending
on your needs). Then set the parameter's value property to the HTML and give
that a shot. The SqlCommand object will make assumptions and handle some of
the data that would normally be invalid when executing a string.
Thanks,
Ian Suttle
http://www.IanSuttle.com
"Dexter" wrote:
> I need to save a text with html tags in a SQL Server database. I'm using
> server.htmlencode, but don't function.
> A error is generate.
>
> Somebody know how to resolve this problem?
>
>
> Dexter
>
>
>
- Next message: Curt_C [MVP]: "Re: update record in access"
- Previous message: dkode8_at_gmail.com: "Re: How to save html tags at SQL Server?"
- In reply to: Dexter: "How to save html tags at SQL Server?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|