DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   VB.NET (http://www.daniweb.com/forums/forum58.html)
-   -   changing part of URL PATH (http://www.daniweb.com/forums/thread89587.html)

bcm Sep 14th, 2007 2:31 am
changing part of URL PATH
 
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.

williamrojas78 Sep 14th, 2007 10:50 am
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:


 Dim i As Integer
 Dim iNumTables As Integer = dstVeh.Tables.Count

 For i = 0 To iNumTables - 1
    Dim strTableName As String = dstVeh.Tables(i).TableName

 ' here you have the table name, so now compare it to "od_minicard2_..."
 ' to make sure it is the right table.

  'if it is the right table, then get the data from dstVeh.Tables(i)

 Next

Regards


All times are GMT -4. The time now is 5:56 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC