需要使用“ DBConnection”类创建数据库连接
我有连接字符串“ ConnString”。可用的解决方案是使用SQLConnection,但是我需要一个DBConnection
DbConnection a;
DbCommand b;
DbDataReader c;
a = DbOpenConnection10.Connection;
b = a.CreateCommand();
b.CommandText = "Select top 1 * from [Table_Name]";
c = b.ExecuteReader();
while (c.Read())
{
Context.UserLogger.Info(c[0]);
}