473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

question about oleDbDataAdapter1.TableMappings


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 ***
Nov 17 '05 #1
0 1041

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dotnetified | last post by:
Reposting after about 2 weeks of no response ... thanks if you can help... ---------------------------------------------------------------------------- -------------- To anyone who thinks they...
3
by: Eric A. Johnson | last post by:
I'm using ADO style. I have an Access database with four tables that I will want to do queries on. I will want to do queries on all four tables, at least individually, and possibly at the same...
6
by: flaavia | last post by:
Hello My oleDbDataAdapter1 seems to be limited to 99 variables in SQL-statements. At least it does give an error when tying to address more than 99 Does anyboda know if that is a fixed limit...
1
by: Ian OBrien via .NET 247 | last post by:
Hi, Im following the visual Basic Walkthrough 'Simple Data Access in a Windows Form' in Visual Studio.net which throws an error at the line OleDbDataAdapter1.Fill(DsAuthors1) ERROR: An unhandled...
1
by: Goober at christianDOTnet | last post by:
A friend of mine is doing some datagrids on a web page, and was using the SQL data adapter on the design view of the page. He is sorting the datagrid on each of the columns as a user clicks on...
5
by: Ale K. | last post by:
Hi, i'm designing my application that has a DLL that controls the Data Layer, and another that Controls the Bussines Layer, at some point my Bussines Layer need to Get an object ( Let's say a...
1
by: Martina | last post by:
In ASP.Net Web Service which refers to 2 databases, how do make one field in one table equal to another field in another table eg In table one OtherID, holds ClientID from the second table, these...
13
by: Saber | last post by:
I did a lot of searches and read something about datagrids. But I couldn't find the answer of my simple question, how can I show only my desired columns of a table? for example I wrote this sql...
0
Sl1ver
by: Sl1ver | last post by:
Hi Doesn't the grid that you create, create its own datatable that you can use in the program, meaning for a update code that i want to use with my datagrid i need a datable, but that means i have...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.