Hi,
the using a DataAdapter to connect to a database which has tables
according to year, for example
dep2005, dep2004. I have a comboBox that contains the years
(2005,2004,2003). The user will choose from the comboBox the year that
he wants to view.
The Data Adapter will look for the table according to what user chose.
this.oleDbDataAdapter1.TableMappings.AddRange(new
System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "DEPT2004", --- I want
to change this to DEPTY, where y is the variable that contains the value
of the year, 2004,2003
new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("DEP_CODE", "DEP_CODE"),
new System.Data.Common.DataColumnMapping("DEP_NAME", "DEP_NAME"))),
What should I do? Anu suggestions?
Cheers!
Claudi
*** Sent via Developersdex
http://www.developersdex.com ***