Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about DataSet Tables 1

Status
Not open for further replies.

Turpis

Programmer
Apr 16, 2002
151
I was curious as to whether there is any difference between:

Me.dsMaster.Tables(0)
Me.dsMaster.Tables("myTable")
Me.dsMaster.myTable

In most examples I see the second two types.

If there is truly 3 ways to refer to a single table in a dataset, what is 'good coding'?

Charles
Quality Assurance/Developer
 
if all three of them work. All of them are good practice. At least none of them is bad practice.
Personnaly I never used method number three and dont even know if it works

Christiaan Baes
Belgium

What a wonderfull world - Louis armstrong
 
Method three occurs in a strongly type dataset. It gets converted to an index access i.e MyTable is a function that returns something like dsMaster.Tables(0). Access via a name in a string should be slower because it must be searched for in the table collection.

Forms/Controls Resizing/Tabbing
Compare Code
Generate Sort Class in VB
Check To MS)
 
Thanks Christiaan and John for your responses. A star to you John, I am always looking to avoid the slower coding sequences.

Charles
Quality Assurance/Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top