DBCommandWrapper

G

Guest

I am developing a web service in C# in Visual Studio 2005. I am trying to
use the Enterprise Library for data. But it will not recognise
DBCommandWrapper. I have added all the relevant references to the EL
Configuration, Data Access, etc and I have this at the top:

using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Data.Configuration;


It gives this error message at DBCommandWrapper:
The type or namespace name 'DBCommandWrapper' could not be found (are you
missing a using directive or an assembly reference?)

Can you tell me what I have missed, please?

Thanks,
Helen
 
S

sloan

''

What version of dotnet/visual studio are you using.

From your previous post, I think its
VS2005
DotNet 2.0.

Ok...

Which version of the EnterpriseLibrary are you using?

There is a release for 1.1 (VS2003) and there is a seperate release for 2.0
(VS2005).

Which are you using?

The reason I was, is because there was a 1.1 object, which was deprecated in
the 2.0 library.

http://msdn2.microsoft.com/en-us/library/system.data.common.dbcommand.aspx

The quickest way to determine which you have is

is your
ExecuteNonQuery
ExecuteReader
methods...are they on the Database object, or the DBCommandWrapper object?


If you are using the 2.0 library, then you need to add this using statement

using System.Data.Common;// That's because that is where DBCommand
exists....its a "real" .Net object now.


....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top