Reputation: 455
Can you please help me
Sqlconnection con;//**error**[The type or namespace name 'Sqlconnection' could not be found (are you missing a using directive or an assembly reference?]
Sqlcommand com;//**error**[The type or namespace name 'Sqlcommand' could not be found (are you missing a using directive or an assembly reference?]
Upvotes: 0
Views: 2101
Reputation: 152634
You're missing a capital C
- C# is case-sensitive:
SqlConnection
SqlCommand
^
|
|
You also need to make sure you've referenced System.Data.DLL
and included the namespace in your using
block at the top of the class:
using System.Data.SqlClient;
Upvotes: 8