Display query on an array?

NenCh

New member
Joined
Mar 27, 2009
Messages
1
Location
Kyoto
Programming Experience
Beginner
Help me...
Hello how the heck should I do this...

This is my code in php...
<?php
$query = "SELECT url,link FROM `links` ORDER BY link_ID ASC ";
$result = @mysql_query($query);
if(mysql_num_rows($result)==0) {
echo '<div>No Available Links</div>';
} else {
while($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo '<a href="'.$row[0].'" >'.$row[1].'</a>';
}
@mysql_free_result($result);
}
?>

how should i do that in VB.NET without using any grid view or what so ever objects in Visual Studio...

Can this be possible in vb.net?
 
hi
you can use datareader & read it within while , if or ...
VB.NET:
 Dim dr As SqlDataReader
 dbCon.Open()
 dr = sqlcom.ExecuteReader
 If dr.HasRows = True Then
  txt_clientID.Text = CType(dr("cID"),Integer).ToString()
  txt_clientAddress.Text = CType( dr("cAddress"),String)
   txt_clientPhoneNumber.Text = CType(dr("cPhoneNumber"),String)
 End If
 dr.Close()
dbCon.Close()
 
Back
Top