Click here to Skip to main content
15,891,851 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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) {...} 

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;"
Posted

1 solution

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:
C#
SqlHelper objSqlHelper = new SqlHelper();
// Now try objSqlHelper.  

// you should find all the methods present in the helper class in the intellisense.
 
Share this answer
 
v2
Comments
jalmonte 15-Sep-10 15:05pm    
Reason for my vote of 5
Automatic vote of 5 for accepting answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900