Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How do I query a dataset and return a new table

Reply
Thread Tools

How do I query a dataset and return a new table

 
 
HB
Guest
Posts: n/a
 
      10-28-2005
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


 
Reply With Quote
 
 
 
 
John Timney \( MVP \)
Guest
Posts: n/a
 
      10-28-2005
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" <(E-Mail Removed)> wrote in message
news:OvJyUT$(E-Mail Removed)...
>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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net Datagrid Control 2 10-31-2003 02:43 AM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 1 10-31-2003 02:39 AM
how 2 return xml dataset to non-.NET users, formatted in a table? Jason Shohet ASP .Net Web Services 1 09-30-2003 07:18 PM



Advertisments