Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 19th, 2005, 05:34 AM
Red Red is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 78 Red User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 13 m 52 sec
Reputation Power: 5
Question Cannot paste my text into column

Hi All,

I'm have a strange situation with SQL Server 2000. I am trying to paste this into a VARCHAR (8000):
Quote:
<asp:panel id='pnlFlashBanner' style='Z-INDEX: 104; LEFT: 288px; POSITION: absolute; TOP: 312px'runat='server' Height='112px' Width='632px'><OBJECT codeBase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'height='100' width='600' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' VIEWASTEXT><PARAM NAME='_cx' VALUE='15875'><PARAM NAME='_cy' VALUE='2646'><PARAM NAME='FlashVars' VALUE=''><PARAM NAME='Movie' VALUE='MEB_Banner.swf'><PARAM NAME='Src' VALUE='MEB_Banner.swf'><PARAM NAME='WMode' VALUE='Window'><PARAM NAME='Play' VALUE='-1'><PARAM NAME='Loop' VALUE='-1'><PARAM NAME='Quality' VALUE='High'><PARAM NAME='SAlign' VALUE=''><PARAM NAME='Menu' VALUE='-1'><PARAM NAME='Base' VALUE=''><PARAM NAME='AllowScriptAccess' VALUE='always'><PARAM NAME='Scale' VALUE='ShowAll'><PARAM NAME='DeviceFont' VALUE='0'><PARAM NAME='EmbedMovie' VALUE='0'><PARAM NAME='BGColor' VALUE=''><PARAM NAME='SWRemote' VALUE=''><PARAM NAME='MovieData' VALUE=''><PARAM NAME='SeamlessTabbing' VALUE='1'><embed src='MEB_Banner.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer'type='application/x-shockwave-flash' width='600' height='100'></embed></OBJECT></asp:panel>

Admittedly this is a long piece of text but running a little letter count application I know that it is only 1211 characters long.

However when I paste the above text into SQL Server I get this warning:

"The value you entered not consistent with the data type or length of the column."

I read on the web a little and discovered that somebody had this problem and they had used NVARCHAR instead which fixed it for them, this has not worked for myself though.

Does anyone have any idea what SQL is objecting to?

Thanks, Dave.

Reply With Quote
  #2  
Old July 19th, 2005, 10:20 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
You have to double all of the single quotes first.

Example:
Code:
INSERT INTO TableName
(
	FieldName
)
VALUES
(
	'<asp:panel id=''pnlFlashBanner'' style=''Z-INDEX: 104; LEFT: 288px; POSITION: absolute; TOP: 312px''runat=''server'' Height=''112px'' Width=''632px''><OBJECT codeBase=''http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0''height=''100'' width=''600'' classid=''clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'' VIEWASTEXT><PARAM NAME=''_cx'' VALUE=''15875''><PARAM NAME=''_cy'' VALUE=''2646''><PARAM NAME=''FlashVars'' VALUE=''''><PARAM NAME=''Movie'' VALUE=''MEB_Banner.swf''><PARAM NAME=''Src'' VALUE=''MEB_Banner.swf''><PARAM NAME=''WMode'' VALUE=''Window''><PARAM NAME=''Play'' VALUE=''-1''><PARAM NAME=''Loop'' VALUE=''-1''><PARAM NAME=''Quality'' VALUE=''High''><PARAM NAME=''SAlign'' VALUE=''''><PARAM NAME=''Menu'' VALUE=''-1''><PARAM NAME=''Base'' VALUE=''''><PARAM NAME=''AllowScriptAccess'' VALUE=''always''><PARAM NAME=''Scale'' VALUE=''ShowAll''><PARAM NAME=''DeviceFont'' VALUE=''0''><PARAM NAME=''EmbedMovie'' VALUE=''0''><PARAM NAME=''BGColor'' VALUE=''''><PARAM NAME=''SWRemote'' VALUE=''''><PARAM NAME=''MovieData'' VALUE=''''><PARAM NAME=''SeamlessTabbing'' VALUE=''1''><embed src=''MEB_Banner.swf'' quality=''high'' pluginspage=''http://www.macromedia.com/go/getflashplayer''type=''application/x-shockwave-flash'' width=''600'' height=''100''></embed></OBJECT></asp:panel>'
)

Then it will insert it.

Reply With Quote
  #3  
Old July 19th, 2005, 10:49 AM
Red Red is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 78 Red User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 13 m 52 sec
Reputation Power: 5
Thanks for the help Memnoch. It really had me confused but that is really helpful

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Cannot paste my text into column


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT