Connection String not found in Application (My) Settings VB.Net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinitfichadia
    New Member
    • Aug 2007
    • 9

    Connection String not found in Application (My) Settings VB.Net

    Hello friends,

    At the time of using table adapters in vb.net, suddenly i got error specifying that -> Unable to connection string for object My Settings. Connection String could not be found in application settings or the data provider associated with Connection String could not be loaded.

    But Connection String is already present in My Settings with the same name as of that in app.config file.

    Please help as i m not getting exact solution to these from last day.

    Thanks to all very much.
  • tekeste
    New Member
    • Aug 2007
    • 18

    #2
    I don't know how your connection string look like, check it with this one:

    Dim con As New SqlConnection
    con.ConnectionS tring = "server=(local) ;database=yourd atabase;
    _Trusted_Connec tion=True"

    Dim adapter As SqlDataAdapter
    adapter = New SqlDataAdapter( "your SQL statements", con)
    Dim dsMytable As New DataSet
    adapter.Fill(ds Mytable)

    Comment

    • Shashi Sadasivan
      Recognized Expert Top Contributor
      • Aug 2007
      • 1435

      #3
      If you are using strongly typed datasets to compliment ure adapters, u can try making another dataset, connect a table to it from your database, this will create the connection string for you, Check this connection string with the one that you made in app.config and see what needs to be changed / modified!!

      Comment

      Working...