Solved

VB.NET - Unable to find connection

Posted on 2008-10-08
2
1,470 Views
Last Modified: 2013-11-26
I get "Unable to find connection 'TMMConnectionString' for object 'MySettings'.
 The connection string could not be found in application settings, or the data provider
 associated with the connection string could not be loaded. "

I've looked at the .xsd file in the XML Editor, and I have the code snippet attached here  I only have this one connection string.  When I run the program, everything works just fine!  But when I try to update the queries or add any columns, etc. in the .xsd DataSet Designer, I get the error.  I've also attached the screenshot of the error.  Any ideas?
<Connections>
          <Connection AppSettingsObjectName="MySettings" AppSettingsPropertyName="TMMConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="TMMConnectionString (MySettings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.TMM.My.MySettings.GlobalReference.Default.TMMConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>

Open in new window

screenshot.gif
0
Comment
Question by:redmission
2 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 22685875
That are the configurations for the dataset and how about the configurations for the MySettings ? Check the app.config file in the connectionStrings if you have that one.
0
 
LVL 1

Accepted Solution

by:
k3m earned 500 total points
ID: 22687574
If you right click on blue bar of OLP_LCTNS and select configure. Select previous then previous you should see the dropdown for the connection string.

Or
right click on blue bar of OLP_LCTNS and select view code which will display the .xsd file change or add the connection string

<xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" GeneratorFunctionsComponentClassName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" UserFunctionsComponentName="QueriesTableAdapter" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="myConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="myConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.myConnectionString.ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending an input value from a view to a controller in MVC 3 23
Get month and date in a format 4 35
SSIS Start 2 21
Code works but breaks when I add one section 4 21
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question