Hi, I am using visual studio 2008 express (visual basic). I am doing a query against a SQL Server which wirks fine. Now I would like to create a second query based on the results from the first query. I know this from Access - you create a query lets say A_Result and then you create a second query based on the first one. The first one is then treated as a normal table. Here is my start code: ----- Dim SQLCon As New SqlConnection Dim SQLConnectString As String Dim SQLState1 As String Dim SQLQuery As New SqlDataAdapter Dim Dataset1 As New DataSet SQLConnectString = "data source=DB;Initial Catalog=DB1;User ID=User1;Password=PWD;" SQLState1 = "SELECT ..............;" SQLCon = New SqlConnection(SQLConnectString) SQLCon.Open() SQLQuery = New SqlDataAdapter(SQLState1, SQLConnectString) SQLQuery.Fill(Dataset1) SQLCon.Close() 'just to see results For Each table In dataset1.Tables MsgBox(table.tablename) For Each Column In table.columns MsgBox(Column.columnname) Next Next ---- Against the dataset1 I want now to run a second query with a select statement. Is that possible? Greetz