J
Jeremy
I have a problem inserting/extracting a byte array to/from an Sql DB. The
byte array has a length of 1040. The field in the DB is of type binary (I
have also unsuccessfully tried varbinary). The following example will
explain my problem:
before inserting:
byteArray[0]=144
byteArray[1]=102
....
byteArray[1039]=54
when retrieving from Sql DB and copying back into a byteArray:
byteArray[0]=144
byteArray[1]=0
....
byteArray[1039]=0 (all values starting from position 1 are 0)
So I figure, either I'm not inserting the array correctly in the DB, or I'm
not extracting it correctly.
This is what I'm using right now:
cmd.Parameters.Add("@BiometricData", OleDbType.VarBinary);
cmd.Parameters[8].Value = (byte[])(BiometricData);//casting from Object to
Byte Array
Any help would be greatly appreciated. Been trying to figure this out for a
while a now.. thanks so much!
byte array has a length of 1040. The field in the DB is of type binary (I
have also unsuccessfully tried varbinary). The following example will
explain my problem:
before inserting:
byteArray[0]=144
byteArray[1]=102
....
byteArray[1039]=54
when retrieving from Sql DB and copying back into a byteArray:
byteArray[0]=144
byteArray[1]=0
....
byteArray[1039]=0 (all values starting from position 1 are 0)
So I figure, either I'm not inserting the array correctly in the DB, or I'm
not extracting it correctly.
This is what I'm using right now:
cmd.Parameters.Add("@BiometricData", OleDbType.VarBinary);
cmd.Parameters[8].Value = (byte[])(BiometricData);//casting from Object to
Byte Array
Any help would be greatly appreciated. Been trying to figure this out for a
while a now.. thanks so much!