I created database in visual studio 2017. After creating database, I added the connection string as in the connection string of properties of database.mdf. And my server name is(LocalDB)\MSSQLLocalDB. I got a warning
Option not supported. Parameter name: attachdbfilename
and an exception
System.InvalidOperationException: 'Fill: SelectCommand.Connection property has not been initialized.'
using System;
using MySql.Data.MySqlClient;
con = new MySqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename='C:\Users\rishi\Documents\dbshop.mdf';Integrated Security=True;Connect Timeout=30");
MySqlConnection
, that is not going to work – Mark Rotteveel