1
Answer

HELP WITH SQL CONNECTION STRING

mark jones

mark jones

16y
3.5k
1

Can someone please help as am trying to instantiate a connection string object as follows: sqlConnection1 Con1 = new sqlConnection1();

 

When I try to run the program I get the following error message 'Form1.sqlConnection1' denotes a 'field' where a 'class' was expected.

 

I am currently using Visual Studio and sql server express 5 and I drag a connection object that represents the connection string to the windows form and I use the above code to try and instantiate it.

Any help would be greatly appreciated

Answers (1)