<da************@gmail.comwrote in message
news:11**********************@n15g2000prd.googlegr oups.com...
>I have gotten a query like that to work directly on the database, it
seems the UNION just kills it for the data adapter.
If it works on the database then, the its going to work with a SQL Command
Object with a ADO.DataReader.
>
Essentially what I'm trying to accomplish is this. I have two
identical tables in my database. One is a list of issues that have
been recorded, the other is a list of issues that have not been
recorded. (I have them seperate because I am syncing the unrecorded
table up to a master list, then back down to the recorded list. I
need a datagrid to show the records from both in case your viewing
between syncs.
Yes you can easily do it by making a Function that returns an ArrayList of
Objects, binding it to the datagrid.
Public class infodata
with Propery Gets and Lets
end class
Public class Getdata() as System.Arraylist
Public Function Getthedata() as System.Arraylist
dim strsql = " all of your Select stuff"
dim temparray as new System.Arraylist
SQL Command stuff in the Example
while (MyDataReader.Read())
dim info = new infodata
info.field = DataReader("recid") // you may need to use the Convert and
you
// may need to
wrap with IF checking for Null before
// populating data
or making field Null or 0
temparray,add(info)
end while
MyConnection.Close();
return temparray
end fucntion
end class
dim getd = new Getdata()
datagrid.datasource = getd.Getthedata
datagrid,databind
It's something like that.