This error when your code looks like:
con.Open();
con.ConnectionString="server=localhost;database=sample;username=root;password=****";
The statement con.ConnectionString should come before con.Open(). So the actual correct code is:
con.ConnectionString="server=localhost;database=sample;username=root;password=****";
con.Open();
con is an object of Connection class.
con.Open();
con.ConnectionString="server=localhost;database=sample;username=root;password=****";
The statement con.ConnectionString should come before con.Open(). So the actual correct code is:
con.ConnectionString="server=localhost;database=sample;username=root;password=****";
con.Open();
con is an object of Connection class.
No comments:
Post a Comment