Results 1 to 8 of 8

Thread: SQL Query to recordset

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2004
    Posts
    5

    SQL Query to recordset

    I have a MS SQL database that has multiple tables. One table has a column that has xml that provides the structure of a custom table with a relationship to the aforementioned table and another table that has a column with xml that has the data for that table. I need to have a way to query the database including the table(s) that are defined in xml. I know there is a way to use LINQ to query a dataset. The problem is the queries are too complicated to convert to LINQ.

  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: SQL Query to recordset

    How do you expect anyone to chime in without providing (sample) XML from the column with the structure of this custom table? Post anything that might help other people help you!

    cheers,
    </wqw>

  3. #3
    PowerPoster ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    3,040

    Re: SQL Query to recordset

    Quote Originally Posted by dd_smith View Post
    I have a MS SQL database that has multiple tables. One table has a column that has xml that provides the structure of a custom table with a relationship to the aforementioned table and another table that has a column with xml that has the data for that table. I need to have a way to query the database including the table(s) that are defined in xml. I know there is a way to use LINQ to query a dataset. The problem is the queries are too complicated to convert to LINQ.
    no sorry, I can't "Feel the Source"

    Name:  FeeltheSource.jpg
Views: 185
Size:  5.7 KB
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2004
    Posts
    5

    Re: SQL Query to recordset

    Please see the attached document and xml files for an example of what I am trying to accomplish.

    What I have been trying to do is
    a. extract the names of the tables from the query
    b. Construct any custom form tables that are among the tables named in a.
    c. add all the tables named in a. to a dataset
    d. run the query on the dataset
    Attached Files Attached Files
    Last edited by dd_smith; Nov 9th, 2022 at 05:33 PM.

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2004
    Posts
    5

    Re: SQL Query to recordset

    Quote Originally Posted by dd_smith View Post
    Please see the attached document and xml files for an example of what I am trying to accomplish.

    What I have been trying to do is
    a. extract the names of the tables from the query
    b. Construct any custom form tables that are among the tables named in a.
    c. add all the tables named in a. to a dataset
    d. run the query on the dataset
    Please, any help would be appreciated. This is somewhat urgent. I am working with existing code and I don't have the luxury of time to redesign and code the application.

  6. #6
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,120

    Re: SQL Query to recordset

    This looks like work, like an actual daytime job so no one is willing here to touch it or do it for free. Why would they?

    I peeked briefly at the files and frankly I wouldn't touch such BS even if they were willing to pay me generously.

    cheers,
    </wqw>

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2004
    Posts
    5

    Re: SQL Query to recordset

    Quote Originally Posted by wqweto View Post
    This looks like work, like an actual daytime job so no one is willing here to touch it or do it for free. Why would they?

    I peeked briefly at the files and frankly I wouldn't touch such BS even if they were willing to pay me generously.

    cheers,
    </wqw>
    I have the code that converts the two XML columns to a table. What I am asking is how to include the derived table in a query. I have already looked into querying a dataset, but it isn't supported. The only way that I can find is using LINQ to Dataset. However, the application I am working on is written to specifically use SQL. It would take a lot of rewrite of code to convert all the possible queries to LINQ. That is why I was hoping for a workaround.

  8. #8
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,414

    Re: SQL Query to recordset

    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width