473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

interface don´t expose some fields

I'm constructing a class to database access using the
following interface component :

IDBDataAdapter my_i_DataAdapter;
......
The project has an instance of the class
OdbcDataAdapter my_odbcDA, then I make this:

my_i_DataAdapter = my_odbcDA;

but when I try to set the parameters, the
interface don't expose the field "value",
So I can not do this:

this.my_i_DataAdapter.SelectCommand.Parameters[0].value = variable ;

How can I resolve this ?
thanks.
Nov 10 '06 #1
2 1494
Luiz,
See the IDbCommand and IDbDataParameter interfaces, which cover your
SelectCommand and its parameter(s) respectively.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Luiz" wrote:
I'm constructing a class to database access using the
following interface component :

IDBDataAdapter my_i_DataAdapter;
.....
The project has an instance of the class
OdbcDataAdapter my_odbcDA, then I make this:

my_i_DataAdapter = my_odbcDA;

but when I try to set the parameters, the
interface don't expose the field "value",
So I can not do this:

this.my_i_DataAdapter.SelectCommand.Parameters[0].value = variable ;

How can I resolve this ?
thanks.
Nov 10 '06 #2
Hi Peter,

thanks for your reply, but the solution was not to consult the documentation
of
the IDBCommand, IDbDataParameter or IDataAdapter but to use the class
DBAdapter ( without I ) that is a better implementation of the Interface
IDataAdapater. That class is locate in System.Data.Common and expose more
methods and properties. Other classes also has implementation in details like
DBCommand, DBParameter...

"Peter Bromberg [C# MVP]" wrote:
Luiz,
See the IDbCommand and IDbDataParameter interfaces, which cover your
SelectCommand and its parameter(s) respectively.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Luiz" wrote:
I'm constructing a class to database access using the
following interface component :

IDBDataAdapter my_i_DataAdapter;
.....
The project has an instance of the class
OdbcDataAdapter my_odbcDA, then I make this:

my_i_DataAdapter = my_odbcDA;

but when I try to set the parameters, the
interface don't expose the field "value",
So I can not do this:

this.my_i_DataAdapter.SelectCommand.Parameters[0].value = variable ;

How can I resolve this ?
thanks.
Nov 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Roy Pereira | last post by:
I have an application that is composed of a set of "Content" dlls and a viewer application. The viewer calls a standard set of functions that are present in all the dlls. I maintain this by...
12
by: Steve W. | last post by:
I just read the section (and did the exercise) in the C# Step by Step book that covers Explict Interface Implementation (where you specify in the method implementation the specific interface that...
7
by: Jeff | last post by:
I want to remote several strongly typed datasets and I don't want to distribute the assemblies. I wish to create interface assemblies for these datasets but I don't know where to start. I've...
5
by: Keith Patrick | last post by:
Could someone tell me if it's possible (and if so, how) to call an explicitly-implemented interface method from a subclass? I have a class in which I have to explicity implement some methods, but...
8
by: Gregory | last post by:
I have a question about using STL containers in C++ class public interface. Lets say that I want to return some container from class method or accept class method parameter as some container. For...
1
by: Mark Findlay | last post by:
My C++ .Net project currently uses smart points for SQLDMO object manipulation: SQLDMO::_SQLServerPtr spSQLServer; HRESULT hr = spSQLServer.CreateInstance(__uuidof(SQLDMO::SQLServer)); if...
1
by: Ezmeralda | last post by:
Hello, I need to an TCP/IP Interface for communication with an embedded device. Since I have two different design ideas in mind, I am wondering whether you could give me some hints to decide:...
1
by: Ezmeralda | last post by:
Hello, I need to an TCP/IP Interface for communication with an embedded device. Since I have two different design ideas in mind, I am wondering whether you could give me some hints to decide:...
3
by: pierre.k | last post by:
Hello, does anyone know if there is a way to expose a .NET interface to COM as such? Suppose I have code like this: interface IMyInterface { void Method1(); void Method2(); }
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.