Hi folks...
Brief bit of background: I'm primarily using an IBM DB2 connection for my data, e.g. "Dim custDA2 As New IBM.Data.DB2.iSeries.iDB2DataAdapter." The db2 stuff is set to use a connection string in my project settings, so tablenames in queries that use custDA2 are naturally mapped to tables in the DB2 database. Fair enough, and it works fine. However, I want to construct a subquery that uses a dataset that I build within my form, something like:
This code shows a design-time error "Operator '&' is not defined for types 'String' and 'System.Data.Datatable'."
The DB2 driver does support subqueries. this runs without error, for instance:
Basically, I've pulled a list of components for a particular product into a dataset (ds.tables("ProdCompList") and I've allowed the user to edit that dataset, including deleting items. Now I need to apply any deletes back to the original datasource... but I have to refer to both a connectionstring datasource and to that local dataset.
Anyone have any ideas how to do this?
Thanks...
Chandler
Brief bit of background: I'm primarily using an IBM DB2 connection for my data, e.g. "Dim custDA2 As New IBM.Data.DB2.iSeries.iDB2DataAdapter." The db2 stuff is set to use a connection string in my project settings, so tablenames in queries that use custDA2 are naturally mapped to tables in the DB2 database. Fair enough, and it works fine. However, I want to construct a subquery that uses a dataset that I build within my form, something like:
VB.NET:
"DELETE FROM ItemComp WHERE ItemComp_Item = '" & Trim(Me.lblProduct.Text) & "'" & _
" and ItemComp_Comp NOT IN (SELECT Comp from " & ds.Tables("ProdCompList") & ")"
This code shows a design-time error "Operator '&' is not defined for types 'String' and 'System.Data.Datatable'."
The DB2 driver does support subqueries. this runs without error, for instance:
VB.NET:
"DELETE FROM ItemComp WHERE ItemComp_Item= '" & Trim(Me.lblProduct.Text) & "'" & _
" and ItemComp_Comp NOT IN (SELECT Comp from CompTable)"
Basically, I've pulled a list of components for a particular product into a dataset (ds.tables("ProdCompList") and I've allowed the user to edit that dataset, including deleting items. Now I need to apply any deletes back to the original datasource... but I have to refer to both a connectionstring datasource and to that local dataset.
Anyone have any ideas how to do this?
Thanks...
Chandler