你能帮我么
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?]
Run Code Online (Sandbox Code Playgroud)
你错过了一个资本C- C#是区分大小写的:
SqlConnection
SqlCommand
^
|
|
Run Code Online (Sandbox Code Playgroud)
您还需要确保已在类顶部的块中引用System.Data.DLL并包含命名空间using:
using System.Data.SqlClient;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2085 次 |
| 最近记录: |