[英]ASP.NET connection error in sqlconnection
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?]
You're missing a capital C
- C# is case-sensitive: 您缺少大写的
C
-C#区分大小写:
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: 您还需要确保已引用
System.Data.DLL
,并将名称空间包括在类顶部的using
块中:
using System.Data.SqlClient;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.