Microsoft SQL column configuration

I have a web form that writes data to a Microsoft SQL server.  I believe that my data should be utf8 because there are some special symbols that I need.  

I want to insert this into a nvarchar field:
• NMMA Yacht/CE Certification • Transferable 5-Year Formula Guard® Limited Protection Plan w/10-year Structural Warranty (USA only)• Ashland Maxguard™ LE gelcoat in White or Soft White• Imron® standard graphic in A, B or C • Pressure-treated Perma Panel™ structural hull matrix w/foam-filled hull cavities • Chemically bonded & thru-bolted deck-to-hull joint • Heavy-duty PVC gunwale w/stainless insert • Concealed fiberglass anchor locker• 316L bow rail• Stainless hardware & 316L welded rails• Stainless Formula logo-cast cleats (6), fuel fill, polished engine vent trim & port lights w/screens (2) • Continuous tinted, tempered curved-glass windshield w/stainless top frame, center walk-thru & windshield wiper• Electric horn • 316L stainless transom grab rail & tow eye• Clarion® waterproof transom-mounted stereo control • Integrated swim platform w/concealed stainless swim ladder • Transom shower

but what get inserted into the database is:
• NMMA Yacht/CE Certification • Transferable 5­Year Formula Guard® Limited Protection Plan w/10­year Structural Warranty (USA only)• Ashland Maxguard™ LE gelcoat• Standard graphic in A, B or C w/Axalta™ Chroma Premier® basecoat & Imron® Elite clearcoat• Pressure­treated Perma Panel™ structural hull matrix w/foam­filled hull cavities • Chemically bonded & thru­bolted deck­to­hull joint • Heavy­duty PVC gunwale w/stainless insert • Concealed fiberglass anchor locker• Stainless hardware & 316L welded rails• Stainless Formula logo­cast cleats (8), fuel fill, polished engine vent trim & polished port lights w/screens (2) • Continuous tinted, tempered curved­glass windshield w/stainless top frame, center walk­thru & windshield wiper• Concealed air horn • 316L stainless transom grab rail & ski tow eye• Clarion® waterproof transom­mounted stereo control & two 6­1/2" speakers w/polished stainless grilles  • Integrated swim platform w/concealed stainless swim ladder & pull­up cleats (Woodgrain vinyl decking w/outboard configuration)• Transom shower• Chrome­finished city water inlet

I think maybe it has something to do with collation.  But not quite sure how to set it properly.  I believe all my form stuff is configured for UTF8.

Any ideas how to configure the database?
Baub EisAsked:
Who is Participating?
 
Nitin SontakkeDeveloperCommented:
Did you manage to apply N' while inserting, which would be necessary, I believe.
0
 
Nitin SontakkeDeveloperCommented:
What makes you believe that it is getting inserted that way? Do you have a screen shot or something to demonstrate, please?
0
 
Baub EisAuthor Commented:
I mean when I look at the database from the sql tool that's the data that it is showing?
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
Nitin SontakkeDeveloperCommented:
Aha, that could be deceptive. Please have a look at the following:

29083119.png
declare @some_table table
(
  [some_column] nvarchar(1000)
)

insert into @some_table ([some_column]) values
(N'• NMMA Yacht/CE Certification • Transferable 5-Year Formula Guard® Limited Protection Plan w/10-year Structural Warranty (USA only)
• Ashland Maxguard™ LE gelcoat in White or Soft White• Imron® standard graphic in A, B or C 
• Pressure-treated Perma Panel™ structural hull matrix w/foam-filled hull cavities 
• Chemically bonded & thru-bolted deck-to-hull joint • Heavy-duty PVC gunwale w/stainless insert 
• Concealed fiberglass anchor locker• 316L bow rail• Stainless hardware & 316L welded rails
• Stainless Formula logo-cast cleats (6), fuel fill, polished engine vent trim & port lights w/screens (2) 
• Continuous tinted, tempered curved-glass windshield w/stainless top frame, center walk-thru & windshield wiper
• Electric horn • 316L stainless transom grab rail & tow eye• Clarion® waterproof transom-mounted stereo control 
• Integrated swim platform w/concealed stainless swim ladder • Transom shower')

select *
from @some_table

Open in new window

0
 
Baub EisAuthor Commented:
I hit accepted solution by mistake.  was using mobile app on my phone.

I'm not familar with the N'
0
 
Nitin SontakkeDeveloperCommented:
Oops! Was so happy with the quickest 2K points this morning!

Sorry! Do you mean your problem is not solved? Need more help?
0
 
Baub EisAuthor Commented:
correct problem is not solved
0
 
Baub EisAuthor Commented:
I do need more help
0
 
Nitin SontakkeDeveloperCommented:
Will need more info, friend.

Do you mean you had already applied N' while inserting and get the output you have shown?

How exactly the INSERT is taking place?

May be continue when you are at your desktop as explaining in details could be difficult on mobile due to typing involved.
0
 
Baub EisAuthor Commented:
I did not apply the N', I guess I'm not quite sure what the N' is?
0
 
Baub EisAuthor Commented:
I just add the N' to the beginning of the data I am inserting?
0
 
Nitin SontakkeDeveloperCommented:
Yes, that's right.

That is the way for SQL Server to understand that you intend to insert the nvarchar text and not the varchar text.

Being of broader size, nvarchar can store varchar text.

When you supply a piece of text, SQL Server DOESN'T automatically make it nvarchar just because the column defined is nvarchar. It just takes is as varchar and stores it as varchar in nvarchar column.

When you state N' at the beginning of the text, SQL Server understands your intentions.

Hope that clarifies.
0
 
Nitin SontakkeDeveloperCommented:
Will continue to feel guilty about the points I have got, until I hear from you that this is now resolved to your satisfaction.
0
 
Baub EisAuthor Commented:
Don't feel guilty!  I appreciate the help and quick response.  I was able to resolve the issue.  I use dreamweaver extensions from DMXzone, and I believe there is an issue with their coding.  I was able to isolate the issue enough to send them test pages and show how the data wasn't inserting correctly.  So have fun and enjoy your points!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.