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
patrick
NA
397
0
Insert Binary Array into a row.
Jun 22 2009 10:58 AM
I deleted my other post because I've narrowed down the problem. The data type of the "Data" field is image.
public static void serializeAndStoreData(Data D){
ADODB.Connection conData = new ADODB.Connection();
string strSQL;
object obj = new object();
Guid g = Guid.NewGuid();
Byte[] B = new byte[10];
B=ObjectByteArrayConverter.ObjectToByteArray(D);
conData.Open("Provider=Microsoft.Jet.OLEDB.4.0;"+ "Data Source=" +Properties.Settings.Default.networkedConString, "", "", 0);
strSQL = "INSERT INTO Test (ID, Data) VALUES('" + g + "', '" + B + "' );";
conData.Execute(strSQL, out obj, 0);
conData.Close();
}
I know the serialize works. for some reason, when i pull out data and cast it to byte[], it isnt right. For example, a byte[2000] goes into the database and comes out as byte[30].
Reply
Answers (
0
)
Thread was being aborted error
Keydown on minimized form !