none
What does this error means ? RRS feed

Answers

All replies

  • Hi,

    it is hard so read the text from the picture exactly, but like I understand you have to armk your constructor with a public accessor.


    Best Regards. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. This helps us build a healthy and positive community.

    @Horizon_Net | Blog

    Thursday, October 11, 2012 4:25 PM
  • sorry for the smaller picture

    here is the error

    System.Data.SqlClient.SqlDataReader.Friend Sub New(command As System.Data.SqlClient.SqlCommand, behavior As System.Data.Commandbehavior)' is not accessible in this context because it is 'Friend'

    Friday, October 12, 2012 8:57 AM
  • Hi Chdboy,

    Welcome to the MSDN Forum.

    It indicates that you intend to make a new instance of the type sqlDataReader.

    But the constructor of this class is friend, it is cannot be reached in your code. 

    So, to get the instance, please try 

     you must call the ExecuteReader method of the SqlCommand object, instead of directly using a constructor.

    It is from the remarks: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader(v=vs.110).aspx 

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, October 12, 2012 10:09 AM
    Moderator
  • Has your question been answered? If so, please mark the appropriate post as answer so other community members with a similar question can find help faster.

    Best Regards. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. This helps us build a healthy and positive community.

    @Horizon_Net | Blog

    Thursday, October 18, 2012 11:08 PM