TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Paul Hughes
NA
1
0
SqlParameter limit of 127 characters
Mar 15 2007 8:00 AM
I am developing a watcher service that picks up an xml file from a directory .
using System.XML I read through the XML to provide a string
XMLStr = XMLStr+
"'"
+(pda.ReadInnerXml())+
"'"
;
I then pass this string to my SQL Command to provide the Parameter to a stored procedure
cmdnew.Parameters.Add(XMLStr,
SqlDbType
.NText,);
(the stored procedure uses openxml to load the database)
when I run the application I get the error
The length of the parameter '' all the xml code------''
exceeds the limit of 127 characters
I have tried to split the xml file into 128 character chunks but this will be dificult as the xml file lenth will be variable.
I have also tried various SqlDbTypes all with the same result.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDataSqlDbTypeClassTopic.asp
Just to check things out I pased the XML as a parameter for the Stored procedure in a query Window and it works so that points to the c# code being the problem
anyone any Ideas??
Most appreciated
Paul
Reply
Answers (
0
)
Image transfer between two machines
new application development