Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: how open related data


Message #1 by "Nick" <nick@g...> on Thu, 19 Sep 2002 11:13:34 +0700
Check this out

http://www.wimdows.net/articles/article.aspx?aid=19
Regards,

Akash

-----Original Message-----
From: bounce-aspx_professional-1184710@p...
[mailto:bounce-aspx_professional-1184710@p...]On Behalf Of Nick
Sent: Thursday, September 19, 2002 9:44 AM
To: ASPX_Professional
Subject: [aspx_professional] how open related data


dear all please help me to solve my problem, the first i want to know how to
open and display a data where i use 2 table and have realated, sample
table A
-NCode
-Name
table B
-ACode
-Address
-NCode
in this case maybe One name have 2 Address or more, so i just try and i
using array, the code like this but what i think this not the good solution,
any one know how to make more simple ?
strselect = "select * from table A"
ObjCommand = New SqlCommand(strSelect, ObjConnect)
ObjReader = objCommand.ExecuteReader()
do while ObjReader.Read()
Code(x) = Objreader("Ncode")
x=x+1
loop
Objreader.close()

for x = 1 to 10
strselect = "select * from table B where Ncode = '" & Code(x) &"'"
ObjCommand = New SqlCommand(strSelect, ObjConnect)
ObjReader = objCommand.ExecuteReader()
do while ObjReader.Read()
address = Objreader("Address")
x=x+1
loop
Objreader.close()
next
any one can help me ??




---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450

These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.

---


  Return to Index