ADO String Limitation. 
Author Message
 ADO String Limitation.

I am trying to update 1 field with a large string that looks like below.
Seems like ADO can't support huge string.
I got the error message "[Microsoft][ODBC SQL Server Driver][SQL
Server]String or binary data would be truncated."
Error No from ADO is -2147217833.
How can I work around this?

UPDATE Product SET
Format='<Product_TemplateSetting><mainMenu><mainMenu_not_css_items><items><i
tem section_id=''5'' checkbox=''True'' webOBJ=''198'' Item=''1''
Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa''
DateCreated=''6/13/2001 5:37:47 PM'' ModifyBy='''' DateModified=''7/11/2001
10:55:46 AM'' Issue=''2'' section_name=''My Portal''
Sequence=''1''></item><item section_id=''6'' checkbox=''True''
webOBJ=''198'' Item=''0'' Content='''' status=''1'' Bahasa=''0''
CreateBy=''sa'' DateCreated=''6/13/2001 5:37:47 PM'' ModifyBy=''sa''
DateModified=''7/11/2001 10:55:47 AM'' Issue=''1'' section_name=''Content''
Sequence=''2''><item section_id=''7'' checkbox=''True'' webOBJ=''198''
Item=''1'' Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa''
ModifyBy='''' DateModified=''7/11/2001 10:55:47 AM'' Issue=''5''
section_name=''Marketplace'' Sequence=''1''><item section_id=''8''
checkbox=''True'' webOBJ=''198'' Item=''1'
' Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
DateModified=''7/11/2001 10:55:48 AM'' Issue=''5'' section_name=''Store
Front'' Sequence=''1''></item><item section_id=''9'' checkbox=''True''
webOBJ=''198'' Item=''1'' Content='''' status=''1'' Bahasa=''1''
CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:48 AM''
Issue='''' section_name=''Recruitment'' Sequence=''2''><item
section_id=''11'' checkbox=''True'' webOBJ=''198'' Item=''1'' Content=''''
status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
DateModified=''7/11/2001 10:55:49 AM'' Issue=''2''
section_name=''Jobseeker'' Sequence=''1''></item><item section_id=''12''
checkbox=''True'' webOBJ=''198'' Item=''1'' Content='''' status=''1''
Bahasa=''1'' CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:50
AM'' Issue=''2'' section_name=''Vacancy'' Sequence=''2''><item
section_id=''13'' checkbox=''True'' webOBJ=''198'' Item=''1''
 Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
DateModified=''7/11/2001 10:55:50 AM'' Issue=''2'' section_name=''Add
vacancy'' Sequence=''1''></item><item section_id=''14'' checkbox=''True''
webOBJ=''198'' Item=''1'' Content='''' status=''1'' Bahasa=''1''
CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:51 AM''
Issue=''2'' section_name=''Summary''
Sequence=''2''></item></item></item></item></item><item section_id=''1''
checkbox=''True'' webOBJ=''198'' Item=''0'' Content='''' status=''1''
Bahasa=''0'' CreateBy=''sa'' DateCreated=''6/13/2001 5:37:46 PM''
ModifyBy=''sa'' DateModified=''7/11/2001 10:55:51 AM'' Issue=''1''
section_name=''Content'' Sequence=''3''><item section_id=''2''
checkbox=''True'' webOBJ=''198'' Item=''1'' Content='''' status=''1''
Bahasa=''1'' CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:51
AM'' Issue=''1'' section_name=''System Admin'' Sequence=''1''><item sect
ion_id=''3'' checkbox=''True'' webOBJ=''198'' Item=''1'' Content=''''
status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
DateModified=''7/11/2001 10:55:51 AM'' Issue='''' section_name=''List
users'' Sequence=''1''></item><item section_id=''4'' checkbox=''True''
webOBJ=''198'' Item=''1'' Content='''' status=''1'' Bahasa=''1''
CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:51 AM''
Issue='''' section_name=''Add user'' Sequence=''2''></item></item><item
section_id=''10'' checkbox=''True'' webOBJ=''198'' Item=''0'' Content=''''
status=''1'' Bahasa=''0'' CreateBy=''sa'' ModifyBy=''sa''
DateModified=''7/11/2001 10:55:51 AM'' Issue=''1'' section_name=''Content''
Sequence=''1''></item><item section_id=''19'' checkbox=''True'' webOBJ=''''
Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
ModifyBy=''sa'' DateModified=''7/11/2001 10:55:52 AM'' Issue=''1''
section_name=''Content'' Sequence=''2''></it
em></item><item section_id=''22'' checkbox=''True'' webOBJ='''' Item=''0''
Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
DateCreated=''7/10/2001 6:31:23 PM'' ModifyBy='''' DateModified=''7/11/2001
10:55:52 AM'' Issue=''1'' section_name=''Content''
Sequence=''4''></item><item section_id=''47'' checkbox=''True'' webOBJ=''''
Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
DateCreated=''7/10/2001 6:32:07 PM'' ModifyBy=''sa''
DateModified=''7/11/2001 10:55:52 AM'' Issue=''1'' section_name=''Content''
Sequence=''5''></item><item section_id=''38'' checkbox=''True'' webOBJ=''''
Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
DateCreated=''7/10/2001 6:49:09 PM'' ModifyBy='''' DateModified=''7/11/2001
10:55:52 AM'' Issue=''1'' section_name=''Content''
Sequence=''6''></item><item section_id=''75'' checkbox=''True'' webOBJ=''''
Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
DateCreated=''7/10/2001 6:50:20 PM'' ModifyBy='''' DateModified=''7/11/2001
10:55:52 AM'' Issue=''1'' section_name=''Content''
Sequence=''7''></item><item section_id=''56'' checkbox=''True'' webOBJ=''''
Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
DateCreated=''7/10/2001 6:49:09 PM'' ModifyBy=''sa''
DateModified=''7/11/2001 10:55:52 AM'' Issue=''1'' section_name=''Content''
Sequence=''8''></item><item section_id=''93'' checkbox=''True'' webOBJ=''''
Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
DateCreated=''7/10/2001 6:50:20 PM'' ModifyBy='''' DateModified=''7/11/2001
10:55:52 AM'' Issue=''1'' section_name=''Content''
Sequence=''9''></item><item section_id=''28'' checkbox=''True'' webOBJ=''''
Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
DateCreated=''7/10/2001 7:02:53 PM'' ModifyBy='''' DateModified=''7/11/2001
10:55:52 AM'' Issue=''1'' section_name=''Content'' Sequence=''10''><
/item><item section_id=''15'' checkbox=''True'' webOBJ=''198'' Item=''1''
Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa''
DateCreated=''7/4/2001'' ModifyBy='''' DateModified=''7/11/2001 10:55:52
AM'' Issue=''7'' section_name=''Forum Simple'' Sequence=''11''></item><item
section_id=''65'' checkbox=''True'' webOBJ='''' Item=''0'' Content=''''
status=''1'' Bahasa=''0'' CreateBy=''sa'' DateCreated=''7/10/2001 7:05:14
PM'' ModifyBy='''' DateModified=''7/11/2001 10:55:52 AM'' Issue=''1''
section_name=''Content'' Sequence=''12''></item><item section_id=''91''
checkbox=''True'' webOBJ='''' Item=''0'' Content='''' status=''1''
Bahasa=''0'' CreateBy=''sa'' DateCreated=''7/10/2001 11:02:43 AM''
ModifyBy=''sa'' DateModified=''7/11/2001 10:55:52 AM'' Issue=''3''
section_name=''Accounting'' Sequence=''13''><item section_id=''189''
checkbox=''True'' webOBJ=''23'' Item=''0'' Content='''' status=''1''
Bahasa=''0'' CreateBy=''sa'' Modif
yBy='''' DateModified=''7/11/2001 10:55:52 AM'' Issue=''''
section_name=''View Job Application'' Sequence=''1''></item></item><item
section_id=''16'' checkbox=''True'' webOBJ=''198'' Item=''1'' Content=''''
status=''1'' Bahasa=''1'' CreateBy=''sa'' DateCreated=''7/4/2001''
ModifyBy='''' DateModified=''7/11/2001 10:55:52 AM'' Issue=''7''
section_name=''Forum Advance''
Sequence=''14''></item></items></mainMenu_not_css_items></mainMenu><selected
_template>3</selected_template><webOBJ7><webOBJ7_not_css_edit_state></webOBJ
7_not_css_edit_state></webOBJ7><image1><image1_not_css_setupURL></image1_not
_css_setupURL><image1_not_css_company_logo_name>xx</image1_not_css_company_l
ogo_name><image1_not_css_link>http://xxx</image1_not_css_link><image1_not_cs
s_Radio_Company_logo>Text</image1_not_css_Radio_Company_logo><image1_not_css
_Radio_link>Url</image1_not_css_Radio_link><image1_not_css_CheckBox_AddLink>
Yes</image1_not_css_CheckBox_AddLink><image1_not_css_toolTips>xxx</image1_no
t_css_toolTips>
<image1_not_css_selected>y</image1_not_css_selected><image1_not_css_edit_sta
te>edited</image1_not_css_edit_state></image1></Product_TemplateSetting>',
WHERE ID= '12'



Sun, 28 Dec 2003 19:22:03 GMT  
 ADO String Limitation.
I think the problem is coming from SQL server, not from ADO.  Are you sure
that none of the strings are too wide for the field definitions?

Philip Meeks
ETV Technologies


Quote:
> I am trying to update 1 field with a large string that looks like below.
> Seems like ADO can't support huge string.
> I got the error message "[Microsoft][ODBC SQL Server Driver][SQL
> Server]String or binary data would be truncated."
> Error No from ADO is -2147217833.
> How can I work around this?

> UPDATE Product SET

Format='<Product_TemplateSetting><mainMenu><mainMenu_not_css_items><items><i
Quote:
> tem section_id=''5'' checkbox=''True'' webOBJ=''198'' Item=''1''
> Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa''
> DateCreated=''6/13/2001 5:37:47 PM'' ModifyBy=''''

DateModified=''7/11/2001
Quote:
> 10:55:46 AM'' Issue=''2'' section_name=''My Portal''
> Sequence=''1''></item><item section_id=''6'' checkbox=''True''
> webOBJ=''198'' Item=''0'' Content='''' status=''1'' Bahasa=''0''
> CreateBy=''sa'' DateCreated=''6/13/2001 5:37:47 PM'' ModifyBy=''sa''
> DateModified=''7/11/2001 10:55:47 AM'' Issue=''1''

section_name=''Content''
Quote:
> Sequence=''2''><item section_id=''7'' checkbox=''True'' webOBJ=''198''
> Item=''1'' Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa''
> ModifyBy='''' DateModified=''7/11/2001 10:55:47 AM'' Issue=''5''
> section_name=''Marketplace'' Sequence=''1''><item section_id=''8''
> checkbox=''True'' webOBJ=''198'' Item=''1'
> ' Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
> DateModified=''7/11/2001 10:55:48 AM'' Issue=''5'' section_name=''Store
> Front'' Sequence=''1''></item><item section_id=''9'' checkbox=''True''
> webOBJ=''198'' Item=''1'' Content='''' status=''1'' Bahasa=''1''
> CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:48 AM''
> Issue='''' section_name=''Recruitment'' Sequence=''2''><item
> section_id=''11'' checkbox=''True'' webOBJ=''198'' Item=''1'' Content=''''
> status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
> DateModified=''7/11/2001 10:55:49 AM'' Issue=''2''
> section_name=''Jobseeker'' Sequence=''1''></item><item section_id=''12''
> checkbox=''True'' webOBJ=''198'' Item=''1'' Content='''' status=''1''
> Bahasa=''1'' CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001
10:55:50
> AM'' Issue=''2'' section_name=''Vacancy'' Sequence=''2''><item
> section_id=''13'' checkbox=''True'' webOBJ=''198'' Item=''1''
>  Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
> DateModified=''7/11/2001 10:55:50 AM'' Issue=''2'' section_name=''Add
> vacancy'' Sequence=''1''></item><item section_id=''14'' checkbox=''True''
> webOBJ=''198'' Item=''1'' Content='''' status=''1'' Bahasa=''1''
> CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:51 AM''
> Issue=''2'' section_name=''Summary''
> Sequence=''2''></item></item></item></item></item><item section_id=''1''
> checkbox=''True'' webOBJ=''198'' Item=''0'' Content='''' status=''1''
> Bahasa=''0'' CreateBy=''sa'' DateCreated=''6/13/2001 5:37:46 PM''
> ModifyBy=''sa'' DateModified=''7/11/2001 10:55:51 AM'' Issue=''1''
> section_name=''Content'' Sequence=''3''><item section_id=''2''
> checkbox=''True'' webOBJ=''198'' Item=''1'' Content='''' status=''1''
> Bahasa=''1'' CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001
10:55:51
> AM'' Issue=''1'' section_name=''System Admin'' Sequence=''1''><item sect
> ion_id=''3'' checkbox=''True'' webOBJ=''198'' Item=''1'' Content=''''
> status=''1'' Bahasa=''1'' CreateBy=''sa'' ModifyBy=''''
> DateModified=''7/11/2001 10:55:51 AM'' Issue='''' section_name=''List
> users'' Sequence=''1''></item><item section_id=''4'' checkbox=''True''
> webOBJ=''198'' Item=''1'' Content='''' status=''1'' Bahasa=''1''
> CreateBy=''sa'' ModifyBy='''' DateModified=''7/11/2001 10:55:51 AM''
> Issue='''' section_name=''Add user'' Sequence=''2''></item></item><item
> section_id=''10'' checkbox=''True'' webOBJ=''198'' Item=''0'' Content=''''
> status=''1'' Bahasa=''0'' CreateBy=''sa'' ModifyBy=''sa''
> DateModified=''7/11/2001 10:55:51 AM'' Issue=''1''

section_name=''Content''
Quote:
> Sequence=''1''></item><item section_id=''19'' checkbox=''True''
webOBJ=''''
> Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> ModifyBy=''sa'' DateModified=''7/11/2001 10:55:52 AM'' Issue=''1''
> section_name=''Content'' Sequence=''2''></it
> em></item><item section_id=''22'' checkbox=''True'' webOBJ='''' Item=''0''
> Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> DateCreated=''7/10/2001 6:31:23 PM'' ModifyBy=''''

DateModified=''7/11/2001
Quote:
> 10:55:52 AM'' Issue=''1'' section_name=''Content''
> Sequence=''4''></item><item section_id=''47'' checkbox=''True''
webOBJ=''''
> Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> DateCreated=''7/10/2001 6:32:07 PM'' ModifyBy=''sa''
> DateModified=''7/11/2001 10:55:52 AM'' Issue=''1''

section_name=''Content''
Quote:
> Sequence=''5''></item><item section_id=''38'' checkbox=''True''
webOBJ=''''
> Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> DateCreated=''7/10/2001 6:49:09 PM'' ModifyBy=''''

DateModified=''7/11/2001
Quote:
> 10:55:52 AM'' Issue=''1'' section_name=''Content''
> Sequence=''6''></item><item section_id=''75'' checkbox=''True''
webOBJ=''''
> Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> DateCreated=''7/10/2001 6:50:20 PM'' ModifyBy=''''

DateModified=''7/11/2001
Quote:
> 10:55:52 AM'' Issue=''1'' section_name=''Content''
> Sequence=''7''></item><item section_id=''56'' checkbox=''True''
webOBJ=''''
> Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> DateCreated=''7/10/2001 6:49:09 PM'' ModifyBy=''sa''
> DateModified=''7/11/2001 10:55:52 AM'' Issue=''1''

section_name=''Content''
Quote:
> Sequence=''8''></item><item section_id=''93'' checkbox=''True''
webOBJ=''''
> Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> DateCreated=''7/10/2001 6:50:20 PM'' ModifyBy=''''

DateModified=''7/11/2001
Quote:
> 10:55:52 AM'' Issue=''1'' section_name=''Content''
> Sequence=''9''></item><item section_id=''28'' checkbox=''True''
webOBJ=''''
> Item=''0'' Content='''' status=''1'' Bahasa=''0'' CreateBy=''sa''
> DateCreated=''7/10/2001 7:02:53 PM'' ModifyBy=''''

DateModified=''7/11/2001
Quote:
> 10:55:52 AM'' Issue=''1'' section_name=''Content'' Sequence=''10''><
> /item><item section_id=''15'' checkbox=''True'' webOBJ=''198'' Item=''1''
> Content='''' status=''1'' Bahasa=''1'' CreateBy=''sa''
> DateCreated=''7/4/2001'' ModifyBy='''' DateModified=''7/11/2001 10:55:52
> AM'' Issue=''7'' section_name=''Forum Simple''

Sequence=''11''></item><item

- Show quoted text -

Quote:
> section_id=''65'' checkbox=''True'' webOBJ='''' Item=''0'' Content=''''
> status=''1'' Bahasa=''0'' CreateBy=''sa'' DateCreated=''7/10/2001 7:05:14
> PM'' ModifyBy='''' DateModified=''7/11/2001 10:55:52 AM'' Issue=''1''
> section_name=''Content'' Sequence=''12''></item><item section_id=''91''
> checkbox=''True'' webOBJ='''' Item=''0'' Content='''' status=''1''
> Bahasa=''0'' CreateBy=''sa'' DateCreated=''7/10/2001 11:02:43 AM''
> ModifyBy=''sa'' DateModified=''7/11/2001 10:55:52 AM'' Issue=''3''
> section_name=''Accounting'' Sequence=''13''><item section_id=''189''
> checkbox=''True'' webOBJ=''23'' Item=''0'' Content='''' status=''1''
> Bahasa=''0'' CreateBy=''sa'' Modif
> yBy='''' DateModified=''7/11/2001 10:55:52 AM'' Issue=''''
> section_name=''View Job Application'' Sequence=''1''></item></item><item
> section_id=''16'' checkbox=''True'' webOBJ=''198'' Item=''1'' Content=''''
> status=''1'' Bahasa=''1'' CreateBy=''sa'' DateCreated=''7/4/2001''
> ModifyBy='''' DateModified=''7/11/2001 10:55:52 AM'' Issue=''7''
> section_name=''Forum Advance''

Sequence=''14''></item></items></mainMenu_not_css_items></mainMenu><selected
_template>3</selected_template><webOBJ7><webOBJ7_not_css_edit_state></webOBJ
7_not_css_edit_state></webOBJ7><image1><image1_not_css_setupURL></image1_not
_css_setupURL><image1_not_css_company_logo_name>xx</image1_not_css_company_l
ogo_name><image1_not_css_link>http://xxx</image1_not_css_link><image1_not_cs
s_Radio_Company_logo>Text</image1_not_css_Radio_Company_logo><image1_not_css
_Radio_link>Url</image1_not_css_Radio_link><image1_not_css_CheckBox_AddLink>
Yes</image1_not_css_CheckBox_AddLink><image1_not_css_toolTips>xxx</image1_no
Quote:
> t_css_toolTips>

<image1_not_css_selected>y</image1_not_css_selected><image1_not_css_edit_sta

- Show quoted text -

Quote:
> te>edited</image1_not_css_edit_state></image1></Product_TemplateSetting>',
> WHERE ID= '12'



Sun, 28 Dec 2003 23:10:49 GMT  
 ADO String Limitation.
Thanks for the reply.
I have tried executing the same line in Query Anlyser,
and it works.
The datatype is 'ntext'.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 29 Dec 2003 09:12:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. String length limitation?

2. String Length Limitation Workaround?

3. String limitations

4. 64K string limitation

5. 64K string limitation problem

6. 32k String & Text Box Limitation

7. string length limitation?

8. HELP 64K String limitation

9. Limitation on HTTP string length?

10. How to work arround the limitation of string fields

11. string limitation

12. String size limitation

 

 
Powered by phpBB® Forum Software