Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8317547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:38:30+00:00 2026-06-08T21:38:30+00:00

I Searched and searched and found no clear answer to this problem. How to

  • 0

I Searched and searched and found no clear answer to this problem.

How to convert array byte to SQLBinary.

I’ve tried with Narrowing/Widening Operators but nothing seems to work…

Public Shared Widening Operator CType(ByVal p1 As Byte()) As SQLBinary

End Operator

This throws an error: Error 8 Either the parameter type or the return type of this conversion operator must be of the containing type ‘reportManager’. reportManager.ascx.vb 12 37

So how do I go around this and create a function of the sorts that can convert this properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:38:32+00:00Added an answer on June 8, 2026 at 9:38 pm

    Just pass the Byte Array into the constructor:

        Dim objSqlBinary As New System.Data.SqlTypes.SqlBinary(myByteArray)
    

    Widening CType Operators require that the class that you define them in be either the return type or what gets
    converted. I’m assuming you defined that operator in your reportManager.ascx.vb file, which is why its looking for reportManager.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Searched a lot about this problem but never found a answer, that solved it.
I've searched the entire web for a clear answer but haven't found one yet.
I've searched around with this and haven't found any clear answers. I'm using Eclipse
Sorry if this is a duplicate question...I've searched around and found similar advice but
I've searched around and haven't really found a clear answer as to when you'd
I have searched and not found any clear answers to a problem im having.
I've searched for this in quite a few areas, but haven't found a crystal
I've searched for this for quite a while and haven't found a clear example
I searched and found three fairly good posts but all of them were animating
I have searched and found a lot of different things but none that actually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.