471,319 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

Put int into SqlDbType.Binary typed parameter

I have a parameter typed SqlDbType.Binary and length 30. I can transfer to
this parameter an int value.
How can I transfer this value?

Thanks!

Mihaly
Jan 25 '06 #1
4 3741
Mihaly,

I don't know how you can transfer it into an int. I mean, you have 30
bytes, and an int is only 4. What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mihaly" <Mi****@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com...
I have a parameter typed SqlDbType.Binary and length 30. I can transfer to
this parameter an int value.
How can I transfer this value?

Thanks!

Mihaly

Jan 25 '06 #2
No. I try to transfer an int value in parameter with Binary(30) type.

Mihaly

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mihaly,

I don't know how you can transfer it into an int. I mean, you have 30
bytes, and an int is only 4. What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mihaly" <Mi****@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com...
I have a parameter typed SqlDbType.Binary and length 30. I can transfer to
this parameter an int value.
How can I transfer this value?

Thanks!

Mihaly


Jan 25 '06 #3
Mihaly,

Well, you would have to create a byte array to pass. You can populate
this byte array by using the static GetBytes method on the BitConverter
class.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mihaly" <Mi****@discussions.microsoft.com> wrote in message
news:1D**********************************@microsof t.com...
No. I try to transfer an int value in parameter with Binary(30) type.

Mihaly

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mihaly,

I don't know how you can transfer it into an int. I mean, you have
30
bytes, and an int is only 4. What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mihaly" <Mi****@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com...
>I have a parameter typed SqlDbType.Binary and length 30. I can transfer
>to
> this parameter an int value.
> How can I transfer this value?
>
> Thanks!
>
> Mihaly


Jan 25 '06 #4
Thank you!

Mihaly

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mihaly,

Well, you would have to create a byte array to pass. You can populate
this byte array by using the static GetBytes method on the BitConverter
class.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mihaly" <Mi****@discussions.microsoft.com> wrote in message
news:1D**********************************@microsof t.com...
No. I try to transfer an int value in parameter with Binary(30) type.

Mihaly

"Nicholas Paldino [.NET/C# MVP]" wrote:
Mihaly,

I don't know how you can transfer it into an int. I mean, you have
30
bytes, and an int is only 4. What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mihaly" <Mi****@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com...
>I have a parameter typed SqlDbType.Binary and length 30. I can transfer
>to
> this parameter an int value.
> How can I transfer this value?
>
> Thanks!
>
> Mihaly


Jan 25 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by David Stockwell | last post: by
1 post views Thread by Ramzi Abboud | last post: by
2 posts views Thread by valmir cinquini | last post: by
2 posts views Thread by adams114 | last post: by
21 posts views Thread by Peter Bradley | last post: by
5 posts views Thread by =?Utf-8?B?YmJkb2J1ZGR5?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.