SqlDataReader in ADO.NET Part 8


sqldatareader has no constructors defined

Text version of the video


All ADO .NET Text Articles

All ADO .NET Slides

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

In this video we will learn about
1. The purpose of SqlDataReader
2. Creating an instance of SqlDataReader
3. Reading data using SqlDataReader’s Read() method

Nguồn: https://chaoticpharmacology.com/

Xem thêm bài viết khác: https://chaoticpharmacology.com/cong-nghe/


  1. Thank you, Doctor Venkat. I have nothing better to offer you than to invite you to the greatest blessing in the universe, which is the blessing of Islam and enough for it to be grace .. God says change the religion of God they desire and for him the safest of the heavens and the earth voluntarily and his hatred and to him they return … He also says .. that religion is with God Islam and who seeks Other than the religion of Islam, it will not be accepted from him, and he is in the hereafter among the losers .. He also says .. There is no compulsion in religion, so whoever disbelieves the tyrant and believes in God, he adheres to the trustworthy loop, which is inseparable and God is All-Knowing.

  2. @kudvenkat i really like your videos. You cover the topics very nicely and each video is kept of appropriate length. Great job!!!

  3. Sir, Please how many years it takes you to become an excellent programmer? coz you are just too good. Too good I reapeat.

  4. this query seems to generate problem in my code

    SqlCommand getuserinfo = new SqlCommand("SELECT * FROM tbl_admin WHERE user '" + txtUser + "' AND password '" + txtPwd + "'", con);

  5. SqlCommand getuserinfo = new SqlCommand("SELECT * FROM tbl_admin WHERE user '" + txtUser + "' AND password '" + txtPwd + "'", con);

  6. Hi,

    I really appreciate your help on my issue, while declaration of sqldatareader object (SqlDataReader rdr = cmd.ExecuteReader()) I received an error saying "cannot implicitly converter type 'System.Data.SqlClient.SqlDataReader' to 'projectname.SqlDataReader' "

  7. thank you very much sir your explanations are intensively clear so it made it easy to comprehend and learn such huge amount of information in short time

  8. Hello venkat sir ,
    great sir i am Ur online video student and your video series helping me so much. Because  Your explanations are so simple and clear. I watched around five hundred of your videos already

  9. That video helped me so much. Your explanations are so simple and clear, you make it fun to learn. I watched around hundred of your videos already.Thank you!

  10. What about the SqlCommand cmd object. Should this be declared within a using Block so that it will get disposed? Thanks

  11. Have you ever request  yourself about where is your indiscryptible "attirance" for caramel coming from?
    Thank's for your tuto, as every time

  12. Thanks Venkat. You explained everything in very simple language. Thanks again for sharing these videos.

  13. Hi venkat, greeting familiar yes
    to insert update delete tutorial on C # what is not?
    thank you so much for helping us.

  14. continuation…if so can u show us how to cahnge the data using sqlexecutereader pls?
    sqldatareader requires an active connection to the datasource,while reading data….what does it mean…pls tell us….thanks in advance

  15. hi venkat ,
    from this video v learned that sqldatareader is read only,forward only and requires active connection….
    1)even sqlexecutereader also used to retrieve the records….
    2)before v write cmd.sqlexecutereader v write connectin.open and same is the case with sqdatareader
    so what is the difference between sqldatareader and sqlexecutereader…..pls clarify this doubt
    3)from this video v learned that v cannot change the data using sqldatareader.can v change data using sqlexecuterader?

  16. Thank you very much for taking time to give feedback. In the description of this video, I have included the link for ASP .NET, C#, and SQL Server playlists. All the videos are arranged in logical sequence in these playlists, which could be useful to you. Please share the link with your friends who you think would also benefit from them. If you like these videos, please click on the THUMBS UP button below the video. For email alerts, when new videos are uploaded, you may subscribe to my channel.

  17. Besides closing the connection or the reader with the Using statement or in the Finally block, there is also another way which specify the "CloseConnection" behavior within the parentheses of the ExecuteReader method of a command object. It is one of the members of the CommandBehavior enumeration, and is generally being used as such SqlDataReader reader = cmd.ExecuteReader(CommandBehav­­ior.CloseConnection). The connection will be closed automatically when the data reader is closed.

  18. HI venkat….Can you plz share how to write a parameterised query that inlcudes WHERE clause..Because we cannot pass comma separated values as parameters directly…can you please shows us how to deal with these parametersied queries especially for WHERE and LIKE clauses..

  19. Hello Sir,
    I have solved the above error. Actually There was an issue with the name of the class which i had given to be SqlDataReader, which is an already existing class in Ado.Net Framework. So I changed the name of the class file and the issue was resolved. But thank you so much for checking it. And also, your videos are the source of tremendous knowledge. I have share them to as many Facebook Pages as I can, also with my juniors….

  20. Hello Sir, there seems to be some error for these videos. I am using Visual studio 2012 and there is an error at line :

    using (SqlDataReader rdr = cmd.ExecuteReader())

    Error 1 Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'StoreProcedureEgOne.SqlDataReader'

    Can you help me with that please ??


Please enter your comment!
Please enter your name here