User603697307 posted
I have the following development environment for ASP.Net WebPage
VS 2015 Professional Version, using .Net Framework 4.0
MySQL Server 5.6,
MySQL .Net Connector 6.9.5
MySQL for Visual Studio 2.0.2
I am able to connect to the MySQL database server from Visual Studio Server Explorer.
I am trying to create a SQL DataSource for MySQL Database.
When I go through the configure data source wizard, it works fine by populating the tables and columns for each table in "Configure Select Statement form", but then it fails when I try to run the test query in the wizard. It gives errors
"Could Not Create Connection Object reference not set to an instance of an object."
After that I click OK and Finish and the try to refresh schema on the SQLDataSource object in the design view it gives the error
"Unable to retrieve schema. Ensure that the ConnectionString and SelectCommand properties are valid. Object reference not set to an instance of an object."
Following code is generated in the aspx file.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gdsvalueConnectionString %>"
ProviderName="<%$ ConnectionStrings:gdsvalueConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [sites]"></asp:SqlDataSource>
And the connection string looks like this in web.config
<connectionStrings>
<add name="gdsvalueConnectionString" connectionString="server=localhost;user id=root;password=admin;persistsecurityinfo=True;database=gdsvalue"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
You can see the error image at this link : https://drive.google.com/open?id=0B8Arhho9L0FwbTRPOGFfWjBydW8
Please help me figure out what is missing in my development environment.
Shriram Karpur