Dim sCoName As String = oDs.Customers(0).CompanyName
The part that I want to understand is the oDs.Customers(0). Does
oDs.Customers(0) mean 1st row of the datatable Customers. Where can I find
more information about this? 7 1912
Well, I have found that this is something called collection's index. I find
the information in here: http://msdn2.microsoft.com/en-us/lib...d6(VS.80).aspx.
Besides collection's index, it mentions that I can do the same thing using
collection-specific statements in your programming language. How to do that
in VB?
Peter
"Peter" wrote:
Dim sCoName As String = oDs.Customers(0).CompanyName
The part that I want to understand is the oDs.Customers(0). Does
oDs.Customers(0) mean 1st row of the datatable Customers. Where can I find
more information about this?
"Peter" <Pe***@discussions.microsoft.comschrieb
Well, I have found that this is something called collection's index.
I find the information in here: http://msdn2.microsoft.com/en-us/lib...d6(VS.80).aspx.
Besides collection's index, it mentions that I can do the same thing
using collection-specific statements in your programming language.
How to do that in VB?
Peter
In general, it's a Default property. You can call a Default property by
omitting the property name. For example, if a class' Default property is
"Item", you can write
theObject.Item(Index)
or
theObject(Index)
A Default property is declared by using the Default keyword:
Default Public Property Item(ByVal Index As Integer) As Object
A class (a type) can only have one Default property. It is often used
whenever the nature of the class is something that contains items, similar
to an array whose items can also be accessed by the syntax
"TheArray(Index)".
It's purpose is just having less to type.
Armin
Peter,
This is exactly as you and Armin say. However to add a little bit. What you
show is the part of a generated XSD file. Called a dataset. With Visual
Studio you can generate from an XSD file a class (in VBNet, C# or the other
2 supported languages).
If you instance from that class an object, than you can use it like you do.
To see that class you have in your Solution Explorer in top to set Show all
files.
Than you can open the class and have a look at it. For to make an XSD file
has Visual Studio a lot of tools.
Cor
"Peter" <Pe***@discussions.microsoft.comschreef in bericht
news:C7**********************************@microsof t.com...
Dim sCoName As String = oDs.Customers(0).CompanyName
The part that I want to understand is the oDs.Customers(0). Does
oDs.Customers(0) mean 1st row of the datatable Customers. Where can I
find
more information about this?
Hi Cor,
How can I find out the default property of a class like DataTable, Dataset,
and etc.? I hope one does not need to review coding. I try to look at MSDN
Library for the default property for DataTable class and do not find
anything. I cannot even find the Item property for DataTable class.
"Cor Ligthert[MVP]" wrote:
Peter,
This is exactly as you and Armin say. However to add a little bit. What you
show is the part of a generated XSD file. Called a dataset. With Visual
Studio you can generate from an XSD file a class (in VBNet, C# or the other
2 supported languages).
If you instance from that class an object, than you can use it like you do.
To see that class you have in your Solution Explorer in top to set Show all
files.
Than you can open the class and have a look at it. For to make an XSD file
has Visual Studio a lot of tools.
Cor
"Peter" <Pe***@discussions.microsoft.comschreef in bericht
news:C7**********************************@microsof t.com...
Dim sCoName As String = oDs.Customers(0).CompanyName
The part that I want to understand is the oDs.Customers(0). Does
oDs.Customers(0) mean 1st row of the datatable Customers. Where can I
find
more information about this?
There is no Item property for DataTable. Rows() is the default
property.
On Fri, 17 Aug 2007 18:28:00 -0700, Peter
<Pe***@discussions.microsoft.comwrote:
>Hi Cor,
How can I find out the default property of a class like DataTable, Dataset, and etc.? I hope one does not need to review coding. I try to look at MSDN Library for the default property for DataTable class and do not find anything. I cannot even find the Item property for DataTable class.
"Cor Ligthert[MVP]" wrote:
>Peter,
This is exactly as you and Armin say. However to add a little bit. What you show is the part of a generated XSD file. Called a dataset. With Visual Studio you can generate from an XSD file a class (in VBNet, C# or the other 2 supported languages).
If you instance from that class an object, than you can use it like you do.
To see that class you have in your Solution Explorer in top to set Show all files.
Than you can open the class and have a look at it. For to make an XSD file has Visual Studio a lot of tools.
Cor
"Peter" <Pe***@discussions.microsoft.comschreef in bericht news:C7**********************************@microso ft.com...
Dim sCoName As String = oDs.Customers(0).CompanyName
The part that I want to understand is the oDs.Customers(0). Does
oDs.Customers(0) mean 1st row of the datatable Customers. Where can I
find
more information about this?
"Jack Jackson" <ja********@pebbleridge.comschrieb
There is no Item property for DataTable. Rows() is the default
property.
A DataTable does not have a Default property, but the Rows property,
pointing to a DataRowCollection, does have the Item property as Default
property ("dt.rows(index)").
Armin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have...
|
by: Sarah Tanembaum |
last post by:
Beside its an opensource and supported by community, what's the fundamental
differences between PostgreSQL and those high-price commercial database (and
some are bloated such as Oracle) from...
|
by: Steven T. Hatton |
last post by:
This is something I've been looking at because it is central to a currently
broken part of the KDevelop new application wizard. I'm not complaining
about it being broken, It's a CVS images. ...
|
by: typingcat |
last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so
on. I've tried many PHP IDEs today, but almost non of them supported
Unicode (UTF-8) file.
I've found that the only Unicode...
|
by: David Mathog |
last post by:
If this:
int i,sum;
int *array;
for(sum=0, i=0; i<len; i++){
sum += array;
}
is converted to this (never mind why for the moment):
|
by: Randy Yates |
last post by:
In Harbison and Steele's text (fourth edition, p.111)
it is stated,
The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may...
|
by: Xah Lee |
last post by:
in March, i posted a essay “What is Expressiveness in a Computer
Language”, archived at:
http://xahlee.org/perl-python/what_is_expresiveness.html
I was informed then that there is a academic...
|
by: riceyeh |
last post by:
Hi,
When reading the source code of dojo, it uses the following statement
quite often. What does it mean? What I do not understand is it has a
function definition enclosed in a pair of parenthesis...
|
by: raghu |
last post by:
hello,
Iam going through a document contianing C tricks .In it they
used the statement in many places i didn't understand can u please tell
me the meaning and how the compiler compiles it and runs...
|
by: raghu |
last post by:
Hello
This is raghu. And I want to know about the meaning of the statement
given below
log_txt( __FILE__, __LINE__, ##argList);
in above statement what does FILE ,LINE ##argList mean. I want to...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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...
| |