473,414 Members | 1,761 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,414 software developers and data experts.

Is there a dataadapter that can use a class collectionbase as it's source?

I have data in a collection class of credit cards and I need to query it to
get only the records associated with a particular Personid. I was thinking
that there should be a dataadapter to use a collection as a datasource and
fill a dataset with the results. Do I have just wishful thingk or is this
possible? The collection class is posted below. Thanks for any input.

Steve Mauldin

Public Class AccountCreditCardCollection

Inherits CollectionBase

' Creates an empty collection.

Public Sub New()

End Sub 'New

Public Sub add(ByVal CreditCard As CreditCard)

list.Add(CreditCard)

End Sub 'Add

End Class

Public Class CreditCard

Private nCreditCardID As Long

Private nPersonID As Long

Private nPrimaryInd As Integer

Private sNickName As String

Private sCardName As String

Private sCardNum As String

Private dCardExp As Date

Public Sub New(ByVal pCreditCardID As Long, ByVal pPersonID As Long, ByVal
pPrimaryInd As Integer, ByVal pNickName As String, ByVal pCardName As
String, ByVal pCardNum As String, ByVal pCardExp As Date)

nCreditCardID = pCreditCardID

nPersonID = pPersonID

nPrimaryInd = pPrimaryInd

sNickName = pNickName

sCardName = pCardName

sCardNum = pCardNum

dCardExp = pCardExp

End Sub

Public Property CreditCardID() As Long

Get

Return nCreditCardID

End Get

Set(ByVal Value As Long)

nCreditCardID = Value

End Set

End Property

Public Property PersonID() As Long

Get

Return nPersonID

End Get

Set(ByVal Value As Long)

nPersonID = Value

End Set

End Property

Public Property PrimaryInd() As Integer

Get

Return nPrimaryInd

End Get

Set(ByVal Value As Integer)

nPrimaryInd = Value

End Set

End Property

Public Property NickName() As String

Get

Return sNickName

End Get

Set(ByVal Value As String)

sNickName = Value

End Set

End Property

Public Property CardNum() As String

Get

Return sCardNum

End Get

Set(ByVal Value As String)

sCardNum = Value

End Set

End Property

Public Property CardExp() As Date

Get

Return dCardExp

End Get

Set(ByVal Value As Date)

dCardExp = Value

End Set

End Property

End Class
Nov 18 '05 #1
0 1046

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

Similar topics

2
by: rawCoder | last post by:
Hi, I must be missing something here. All I want is to be able to handle the events of one of my class, objects of which are in a collection. For e.g. I have a class MyClass1 which raises...
2
by: hch | last post by:
dataAdapter.Update(data, "TableName") won’t work! I was about to deploy my first website on the Internet only to discover that the dataAdapter.Update() throws the Server Error in the third...
0
by: Mike Pollett | last post by:
Hi, I have used the ISerializable interface before and the code below worked fine. Until I derived it from CollectionBase. The code will still serialize and deserialize the properties in this class...
1
by: Mike Pollett | last post by:
Hi, I have used the ISerializable interface before and the code below worked fine. Until I derived it from CollectionBase. The code will still serialize and deserialize the properties in this class...
4
by: Vadivel Kumar | last post by:
Hi Guys, I have a doubt which is little bit conceptual rather than a coding convention. I have a a table called products in which I have 40000 and odd products which is expected to be...
5
by: limsy | last post by:
Hi ppl, Sorry for asking such a NEWBIE question. I tried looking for answers but cant find. Maybe its too easy. :( I'm used to manual code ADO rather than this .NET wizard and stuff... and i am...
1
by: davebaranas | last post by:
I am able to serialize this but I get a null exception when I try to deserialize it back Even if I don't make any child classes it throws "Object reference not set to an instance of an object."...
2
by: Stefan Hoffmann | last post by:
hi, as i'm farely new to C#, i have some problem of creating a shallow copy of a class inherited of CollectionBase. As far as i see, i just need to copy the CollectionBase.List using the...
11
by: Bit Byte | last post by:
I am writing a generic container class which I want to support the 'foreach' statement. My class looks something like this: class MyClass<T: CollectionBase { //Implementation for...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.