SqlHelper根本不起作用... [英] SqlHelper not working at all...

查看:110
本文介绍了SqlHelper根本不起作用...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我只是使用Microsoft Application Blocks .NET的新手.我正在使用自定义的...

问题是,当我将SqlHelper参数称为"SqlHelper"时,它仅向我显示等于"或"ReferenceEquals".为什么我可以得到其他人??

Hi,

I am just new using the Microsoft Application Blocks .NET. I am using a custom one...

The problem is that when I call the SqlHelper parameter as "SqlHelper. " it only shows to me "Equals" or "ReferenceEquals". Why I can get the others...?

public void ExecuteNonQuery(SqlCommand sqlCmd) {...}
public SqlDataReader ExecuteReader(SqlCommand sqlCmd) {...} 


我想念的是什么?

我是这样做的:
1.我下载了MS Application Block .NET,然后使用数据访问模块在那运行了我的自定义代码以获取.dll.只是糊涂并粘贴以替换原始代码...它给我一个错误,提示"缺少XML注释",因此我将其禁用.
2.然后我转到我的C#代码并添加为参考.
3.最后,我将其添加为" using Microsoft.ApplicationBlocks.Data; "


What I am missing?

I did this:
1. I downloaded the MS Application Block .NET and then using the Data Access Block I ran my custom code there to get the .dll. Just cooy and paste to replace the original code... It gave to me an error with "missing XML comment" so I disable it.
2. Then I went to my C# code and added as Reference.
3.Finally I added it as "using Microsoft.ApplicationBlocks.Data;"

推荐答案

helper类不是静态"方法,因此它们不直接与类关联.为了访问方法,您需要创建SqlHelper类的对象.

试试:
If you see closely, the methods exposed in the helper class are not ''static'' methods and thus they are not associated with class directly. In order to access the methods, you need to create an object of the SqlHelper class.

Try:
SqlHelper objSqlHelper = new SqlHelper();
// Now try objSqlHelper.  

// you should find all the methods present in the helper class in the intellisense.


这篇关于SqlHelper根本不起作用...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆