473,508 Members | 3,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I query a dataset and return a new table

HB
I have an application that is requiring me to pull 4 tables into a dataset
then perfom the final query to display on the page
Dim objODBCAdapter As New Data.Odbc.OdbcDataAdapter("SELECT
WBS_CMF_NO, WBS_KEY, WBS_DESCRIP FROM CT07WBS;", conn)
objODBCAdapter.Fill(DS, "wbstemp")

How do I excecute the query below against the wbstemp table I just created?

objODBCAdapter.SelectCommand.CommandText = "SELECT
Left([wbs_cmf_no],4) AS Acct, Right([wbs_cmf_no],3) AS Sub, WBS_CMF_NO,
WBS_KEY, WBS_DESCRIP FROM CT07WBS;"
objODBCAdapter.Fill(DS, "wbs")

Due to limitations I cannot use left and right in the original (first)
statement
Thanks for the help
Nov 19 '05 #1
1 1106
have a look if RowFilter can help you at least filter out from each of the
4 tables

http://msdn.microsoft.com/library/de...ilterTopic.asp

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"HB" <po**@group.com> wrote in message
news:Ov**************@tk2msftngp13.phx.gbl...
I have an application that is requiring me to pull 4 tables into a dataset
then perfom the final query to display on the page
Dim objODBCAdapter As New Data.Odbc.OdbcDataAdapter("SELECT
WBS_CMF_NO, WBS_KEY, WBS_DESCRIP FROM CT07WBS;", conn)
objODBCAdapter.Fill(DS, "wbstemp")

How do I excecute the query below against the wbstemp table I just
created?

objODBCAdapter.SelectCommand.CommandText = "SELECT
Left([wbs_cmf_no],4) AS Acct, Right([wbs_cmf_no],3) AS Sub, WBS_CMF_NO,
WBS_KEY, WBS_DESCRIP FROM CT07WBS;"
objODBCAdapter.Fill(DS, "wbs")

Due to limitations I cannot use left and right in the original (first)
statement
Thanks for the help

Nov 19 '05 #2

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

Similar topics

2
4835
by: Andrew Mueller | last post by:
Hello, Since I cannot query a DataSet directly, and I would like to maintain it's data, how would I use an adapter (SqlDataAdapter or DataAdapter) to query this DataSet. Example: Could I? ...
4
302
by: Derek Van Cuyk | last post by:
Hi everyone! I'm trying to write a web application in school that utilizes a MS Access database. I can read and everything fine from it but when I try to add a new record I get an exception that...
2
2717
by: forforumsid | last post by:
Hi all I have a Dataset name: dsMain I popullate with all the data from the database on form load event I have a requirement to filter data as per users requirement on a button click event ...
2
17628
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
How can I run this query against a table in my Access database? I don't know hwo to use it in C#. In VB I would use .Recordset = "some sql statement". How do I do this in C#? //I get a vlaue...
7
6689
by: Jlo | last post by:
Hi, I have a c# winforms application. When I call the report file, it shows me all the records in the table. How can I make it to call only a particular range. i have the following code...
0
7228
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
7128
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
7332
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
7393
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...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5057
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...
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.