none
System.data.sqlclient RRS feed

  • Question

  • hi

     i was doing windows project when I am trying to add referece it did not show me System.data.sqlclient.So the other option to select was System.data.sqlserverCe. But it was not working. it says failed to connect. when I tried to download it again it says it is already there.what I need to do?

    Friday, February 14, 2014 2:10 PM

Answers

  • System.Data.SqlClient namespace is a part of System.Data.dll. So add a reference to "System.Data" from your Add References window and then use "using System.Data.SqlClient" in your code.

    ----------------------- Sujay Sarma {Unbounded;}

    Friday, February 14, 2014 2:20 PM
  • Hi,

    >>where do I write this "using System.Data.SqlClient"?

    I have created a windows forms, please try to check the following by writing this "using System.Data.SqlClient":

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, February 17, 2014 5:11 AM
    Moderator

All replies

  • System.Data.SqlClient namespace is a part of System.Data.dll. So add a reference to "System.Data" from your Add References window and then use "using System.Data.SqlClient" in your code.

    ----------------------- Sujay Sarma {Unbounded;}

    Friday, February 14, 2014 2:20 PM
  • Thank you. But  "using System.Data.SqlClient" is for web application. I am learning Windows Form. It says connection failed. How to use this sqlserver ce
    Friday, February 14, 2014 9:25 PM
  • "using" is a c# construct and is not specific to Windows Forms or Web apps. The syntax of the commands do not change with the end platform.

    ----------------------- Sujay Sarma {Unbounded;}

    Saturday, February 15, 2014 10:58 AM
  • where do I write this "using System.Data.SqlClient"?
    Sunday, February 16, 2014 5:31 PM
  • Hi,

    >>where do I write this "using System.Data.SqlClient"?

    I have created a windows forms, please try to check the following by writing this "using System.Data.SqlClient":

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, February 17, 2014 5:11 AM
    Moderator