473,586 Members | 2,702 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.OdbcD ataAdapter("SEL ECT
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.C ommandText = "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 1115
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******** ******@tk2msftn gp13.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.OdbcD ataAdapter("SEL ECT
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.C ommandText = "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
4839
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? SqlDataAdapter adapter = new SqlDataAdapter();
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 states: "Operation must use an updateable query" I know it has to do with the update command on the OleDbDataAdapter. I've tried looking for the...
2
2725
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 What I want is that when the user clicks the button the program should query the Dataset table and not the database table and return the result
2
17638
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 form a cell and apply it to the SQL statement commandCol = scriptDataGridView.FormattedValue.ToString(); string sCommand = "SELECT CommandString FROM...
7
6699
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 Viewer1.ReportSource = Application.StartupPath + "//Label.rpt"; How can I assign it a dataset which have the data of a particular range.
0
7911
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6610
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2345
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 we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.