944,181 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2002
  • VB.NET RSS
Sep 14th, 2007
0

changing part of URL PATH

Expand Post »
I am doing a project where I am retriving data from a table minicard of a site.
I am using path http://www.cric8.com/od_minicard2.htm
The table has a number od_minicard2_1355
The problem is that when there are two table it pull data of only one table.
how can I get data of both tables say od_minicard2_1355 & od_minicard2_1356
The name of table always increases by one 1355,13356,1357,etc.
Similar Threads
bcm
Reputation Points: 18
Solved Threads: 0
Junior Poster in Training
bcm is offline Offline
63 posts
since Aug 2007
Sep 14th, 2007
0

Re: changing part of URL PATH

Hi

You probably will have to find the number of tables in the dataset, and then go into a loop to retrieve the data. If the tables always start with the "od_minicard2_xxxx" then it is probably a good idea to check the name of the table to make sure you are reding the correct data.

Somthing like this:

VB.NET Syntax (Toggle Plain Text)
  1.  
  2. Dim i As Integer
  3. Dim iNumTables As Integer = dstVeh.Tables.Count
  4.  
  5. For i = 0 To iNumTables - 1
  6. Dim strTableName As String = dstVeh.Tables(i).TableName
  7.  
  8. ' here you have the table name, so now compare it to "od_minicard2_..."
  9. ' to make sure it is the right table.
  10.  
  11. 'if it is the right table, then get the data from dstVeh.Tables(i)
  12.  
  13. Next

Regards
Reputation Points: 23
Solved Threads: 10
Junior Poster
williamrojas78 is offline Offline
111 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: vb or vb.net help please
Next Thread in VB.NET Forum Timeline: Going Insane!!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC