简体   繁体   中英

Correlated query in visual studio 2010

I have two queries that are connected displaying at the same time in my VB project. I want the results of one query to be limited by the current value of the first.

To be more specific, I have one query that lists patient demographics, and another that lists all the visits of all the patients. I want to somehow limit the visits query to only show the visits of the patient currently being displayed.

I don't know visual studio that well, and have basically created my program without a true understanding of what's going on under the hood of the GUI drag-and-drop. Where can I modify the text of the query dynamically with the current value of the patient's query?

TIA

Where can I modify the text of the query dynamically with the current value of the patient's query?

There's a number of technologies that support Drag and Drop, ADO.NET Entity Data Model, Linq To SQL Data Classes, DataSet, ect. Each one has it own mechanism for data retrieval, so it tough to answer your question without knowing which one you're doing.

I don't know visual studio that well, and have basically created my program without a true understanding of what's going on under the hood of the GUI drag-and-drop.

You should take a look at the (but do not modify) the .designer.vb files to see what gets created "under the hood"

If you're still having trouble understanding where the SQL gets created after that you should include some of the code from the .designer.vb files, as well as what technology you're using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM