Change datasource for Dataset

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mikewin86
    New Member
    • Mar 2010
    • 17

    Change datasource for Dataset

    Hello,


    May I ask a question.

    I have a vb.net window application project that connect to Access database.

    I use dataset for all Forms and Reports.

    Now I would like to change back end from Access database to SQL Server 2000 database.

    I change the connection string(Data source, Data Provider etc)to connect to SQL Server 2000.

    But it is not convenience bcos Dataset Designer codes are still connect with OLEDB Provider instead of Sql Client Provider.

    So I can't do my application with SQL Server database.

    May I request suggestion how to do it.

    Thanks in advance.
  • MrMancunian
    Recognized Expert Contributor
    • Jul 2008
    • 569

    #2
    You will have to change your code to SqlClient instead of OleDB. Most of it is just replacing code. Keep in mind that some SQL-statements for SQL Server are different to statement for Access!

    Good luck and let us know if you run in any trouble.

    Steven

    Comment

    • mikewin86
      New Member
      • Mar 2010
      • 17

      #3
      Hello Mr.Steven,

      Thanks for your reply.

      I have tried according to your suggestion.

      But whatever changes I do at dataset, SqlClient codes change back to OLEDB codes.

      So may I know how I can do it.

      Thanks in advance.

      Comment

      • MrMancunian
        Recognized Expert Contributor
        • Jul 2008
        • 569

        #4
        And that's why I don't use wizards to create my DataSet. Perhaps anyone else has an idea?

        Steven

        Comment

        Working...