theAsocialApe
Member
- Joined
- Mar 21, 2008
- Messages
- 13
- Programming Experience
- 5-10
I'm making a little admin utility for updating an error message table. Over time, the messages in dev, test, and prod get out of synch, and so this page will use a gridview to pull from all three datasources, linking them up on their common primary key (errorid). edits or additions can only be made in dev, then user hits a button, and the message text, and errorid (if inserting) are put in test, another button click promotes from test to prod. deletes go against all three regions.
right now, i've got this -
Dim myTempTableDev As Data.DataTable
Dim myTempTableProd As Data.DataTable
Dim myTempTableTest As Data.DataTable
Dim testDS As Data.DataSet = New Data.DataSet
'fill myTempTableDev with data from dev
'fill myTempTableTest with data from test
'fill myTempTableProd with data from prod
'add them all to a dataset and rename them
testDS.Tables.Add(myTempTableDev)
testDS.Tables.Add(myTempTableTest)
testDS.Tables.Add(myTempTableProd)
testDS.Tables(0).TableName = "DEV"
testDS.Tables(1).TableName = "TEST"
testDS.Tables(2).TableName = "PROD"
now what I want to do is combine them into another table in testDS, and use that for the datasource for an asp gridview. the sql, if they were in a db would just be (this is just for testing, eventually, i'll be doing outer joins):
select d.id, d.description as descriptiondev t.description as descriptiontest, p.description as descriptionprod from DEV d inner join TEST t on d.id = t.id inner join PROD p on d.id = p.id
I think I remember there is a way to just use a data.dataset like a db - you can run sql on the tables in it, but i can't remember how.
Am I correct and if so, can you share some knowledge, or am I just getting senile?
Thanks.
right now, i've got this -
Dim myTempTableDev As Data.DataTable
Dim myTempTableProd As Data.DataTable
Dim myTempTableTest As Data.DataTable
Dim testDS As Data.DataSet = New Data.DataSet
'fill myTempTableDev with data from dev
'fill myTempTableTest with data from test
'fill myTempTableProd with data from prod
'add them all to a dataset and rename them
testDS.Tables.Add(myTempTableDev)
testDS.Tables.Add(myTempTableTest)
testDS.Tables.Add(myTempTableProd)
testDS.Tables(0).TableName = "DEV"
testDS.Tables(1).TableName = "TEST"
testDS.Tables(2).TableName = "PROD"
now what I want to do is combine them into another table in testDS, and use that for the datasource for an asp gridview. the sql, if they were in a db would just be (this is just for testing, eventually, i'll be doing outer joins):
select d.id, d.description as descriptiondev t.description as descriptiontest, p.description as descriptionprod from DEV d inner join TEST t on d.id = t.id inner join PROD p on d.id = p.id
I think I remember there is a way to just use a data.dataset like a db - you can run sql on the tables in it, but i can't remember how.
Am I correct and if so, can you share some knowledge, or am I just getting senile?
Thanks.