Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FbCommand method private void UpdateParameterValues() issue [DNET249] #258

Closed
firebird-automations opened this issue Jul 4, 2009 · 4 comments

Comments

@firebird-automations
Copy link

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);

@firebird-automations
Copy link
Author

Commented by: @cincuranet

DNET273

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => Closed [ 6 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Author

Commented by: vinogradniy (vinogradniy)

After preparing the query parameter list is empty. What to do in this case?

@firebird-automations
Copy link
Author

Commented by: @cincuranet

How is this related to this issue (did you noticed that it's closed)? Why should prepare do anything with parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants