You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class FbCommand
method private void UpdateParameterValues()
issue occurs when setting parameter value as byte[] for field with database type BLOB SUBTYPE TEXT
current source code accepts only string value
as a suggestion: replace
blob.Write((string)this.Parameters[index].Value);
with something like this
var valueType = this.Parameters[index].Value.GetType();
if (valueType.IsArray && valueType.GetElementType() == typeof(byte))
{
blob.Write((byte[])this.Parameters[index].Value);
}
else
blob.Write((string)this.Parameters[index].Value);
The text was updated successfully, but these errors were encountered:
Submitted by: @cincuranet
Jira_subtask_inward DNET247
Votes: 2
class FbCommand
method private void UpdateParameterValues()
issue occurs when setting parameter value as byte[] for field with database type BLOB SUBTYPE TEXT
current source code accepts only string value
as a suggestion: replace
blob.Write((string)this.Parameters[index].Value);
with something like this
var valueType = this.Parameters[index].Value.GetType();
if (valueType.IsArray && valueType.GetElementType() == typeof(byte))
{
blob.Write((byte[])this.Parameters[index].Value);
}
else
blob.Write((string)this.Parameters[index].Value);
The text was updated successfully, but these errors were encountered: