Question Problem when creating new data source. Why?

Help request

I meant rather than a video, a full and clear description of the problem.

That's all right. I made the video only to easier understanding where the error is occurring.
It turns out that when I enter the wizard to create a new data source is presenting the following error: “Some updating commands could not be generated automatically. The database returned the following error: Unexpected error”
Data Source configuration wizard: Could not retrieve schema information for table or view.
In the error lis tis showing: Custom tool error: Failed to generate code. Failed to generate code. Object reference not set to an instance of an object. Object reference not set to an instance of an object. WindowsFormsApplication1 C:\Users\henri\documents\visualstudio 2015\Projects\WindowsFormsApplication1\WindowsFormsApplication1\mypcpDataSet3.xsd
And when I click them appear the following screen:
<?xmlversion="1.0"encoding="utf-8"?>
<xs:schemaid="mypcpDataSet"targetNamespace="http://tempuri.org/mypcpDataSet3.xsd"xmlns:mstns="http://tempuri.org/mypcpDataSet3.xsd"xmlns="http://tempuri.org/mypcpDataSet3.xsd"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"attributeFormDefault="qualified"elementFormDefault="qualified">
<xs:annotation>
<xs:appinfosource="urn:schemas-microsoft-com:xml-msdatasource">
<DataSourceDefaultConnectionIndex="0"FunctionsComponentName="QueriesTableAdapter"Modifier="AutoLayout,AnsiClass, Class, Public"SchemaSerializationMode="IncludeSchema"xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections>
<ConnectionAppSettingsObjectName="Settings"AppSettingsPropertyName="mypcpConnectionString"ConnectionStringObject=""IsAppSettingsProperty="true"Modifier="Assembly"Name="mypcpConnectionString(Settings)"ParameterPrefix="@"PropertyReference="ApplicationSettings.WindowsFormsApplication1.Properties.Settings.GlobalReference.Default.mypcpConnectionString"Provider="MySql.Data.MySqlClient" />
</Connections>
<Tables>
<TableAdapterBaseClass="System.ComponentModel.Component"DataAccessorModifier="AutoLayout,AnsiClass, Class, Public"DataAccessorName="matprimaTableAdapter"GeneratorDataComponentClassName="matprimaTableAdapter"Name="matprima"UserDataComponentName="matprimaTableAdapter">
<MainSource>
<DbSourceConnectionRef="mypcpConnectionString(Settings)"DbObjectName="mypcp.matprima"DbObjectType="Table"FillMethodModifier="Public"FillMethodName="Fill"GenerateMethods="Both"GenerateShortCommands="true"GeneratorGetMethodName="GetData"GeneratorSourceName="Fill"GetMethodModifier="Public"GetMethodName="GetData"QueryType="Rowset"ScalarCallRetval="System.Object,mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"UseOptimisticConcurrency="true"UserGetMethodName="GetData"UserSourceName="Fill">
<SelectCommand>
<DbCommandCommandType="Text"ModifiedByUser="false">
<CommandText>SELECTcod_prod, descrição, unidade, tipo FROM matprima</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
</DbSource>
</MainSource>
<Mappings />
<Sources />
</TableAdapter>
</Tables>
<Sources />
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:elementname="mypcpDataSet"msdata:IsDataSet="true"msdata:UseCurrentLocale="true"msprop:EnableTableAdapterManager="True"msprop:Generator_DataSetName="mypcpDataSet"msprop:Generator_UserDSName="mypcpDataSet">
<xs:complexType>
<xs:choiceminOccurs="0"maxOccurs="unbounded">
<xs:elementname="matprima"msprop:Generator_TableClassName="matprimaDataTable"msprop:Generator_TableVarName="tablematprima"msprop:Generator_TablePropName="matprima"msprop:Generator_RowDeletingName="matprimaRowDeleting"msprop:Generator_RowChangingName="matprimaRowChanging"msprop:Generator_RowEvHandlerName="matprimaRowChangeEventHandler"msprop:Generator_RowDeletedName="matprimaRowDeleted"msprop:Generator_UserTableName="matprima"msprop:Generator_RowChangedName="matprimaRowChanged"msprop:Generator_RowEvArgName="matprimaRowChangeEvent"msprop:Generator_RowClassName="matprimaRow">
<xs:complexType>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

Please, I'm learning the language and this error is jammingcontinuity in database design.
I hope has been clearand I make my appologies because my english is not very well.
 
It sounds like there might be an issue in the MySQL components. I'd suggest uninstalling both Connector/Net and the MySQL tools for VS, rebooting and then reinstalling.
 
It sounds like there might be an issue in the MySQL components. I'd suggest uninstalling both Connector/Net and the MySQL tools for VS, rebooting and then reinstalling.

I did what you suggested, but the error kept appearing. I have tried to install on other equipment and the error was the same. Already tried to uninstall the VS 2017 and install old version 2015 and the error is the same. Please help me.

One More info: I already tried to do with MS Access instead of MySQL and the error happens too.
 
Last edited:
Back
Top Bottom