in MSsql how do I preserve formatting?

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
I have a form where users will be entering a max of 5K-10K characters... im definately going to allow 5k, undecided if anything greater.... anyways, when they enter their info, i want any line breaks to be preserved, i dont want users to have to enter html for formatting.... will ntext cover this? im surfing google after i post...
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
A standard varchar or nvarchar field will work as well. The line break characters (Chr(10) and Chr(13)) will be inserted unless you manipulate the string prior to inserting it.

Use bind variables (Prepared SQL statements in Java) to insert your data.
 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
Originally posted by: MrChad
A standard varchar or nvarchar field will work as well. The line break characters (Chr(10) and Chr(13)) will be inserted unless you manipulate the string prior to inserting it.

Use bind variables (Prepared SQL statements in Java) to insert your data.


well, im using cfquery sql inserts in my code... already written...

what exactly are bind variables?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: TechBoyJK
Originally posted by: MrChad
A standard varchar or nvarchar field will work as well. The line break characters (Chr(10) and Chr(13)) will be inserted unless you manipulate the string prior to inserting it.

Use bind variables (Prepared SQL statements in Java) to insert your data.


well, im using cfquery sql inserts in my code... already written...

what exactly are bind variables?

Have you looked at the <cfqueryparam> tags? That's CF's implementation.

Bind variables are a good way to increase application performance. Text
 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
Originally posted by: MrChad
Originally posted by: TechBoyJK
Originally posted by: MrChad
A standard varchar or nvarchar field will work as well. The line break characters (Chr(10) and Chr(13)) will be inserted unless you manipulate the string prior to inserting it.

Use bind variables (Prepared SQL statements in Java) to insert your data.


well, im using cfquery sql inserts in my code... already written...

what exactly are bind variables?

Have you looked at the <cfqueryparam> tags? That's CF's implementation.

Bind variables are a good way to increase application performance. Text

thanks, im looking into that..