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
sankeerth R
NA
105
41.6k
GetBytes method for Text, NText, or Image not for nvarchar?
Dec 13 2017 7:30 AM
The GetBytes function can only be used on columns of type Text, NText, or Image but not for nvarchar datatype.
byte[] outbyte = new byte[dr.GetBytes(dr.Getordinal["Notes"], 0, null, 0, 0)];
long y = dr.GetBytes(dr.Getordinal["Notes"], 0, outbyte, 0, 1000);
encodedtext = Encoding.UTF8.GetString(outbyte);
exception i got is The GetBytes function can only be used on columns of type Text, NText, or Image but not for nvarchar datatype.
Note: Here "Notes" column is a nvarchar type.
Reply
Answers (
0
)
Segregating string
MEF - can't run imported function