By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,467 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,467 IT Pros & Developers. It's quick & easy.

check record and then run second query to display in data grid

P: n/a
Hi All,

I am doing it for the first time in C# (using Visual Studio 2005),

First I need to check if data exists in a table for a variable. If so
then run the second query and display the resultsets in Gridview.

For ex., in the form I am entering contract id and running the query
for that contract id. If results found then use that contract id to
run the second query and show the results in gridview.

My question is how I can accomplish that?
I do appreciate your help.

Thanks a ton in advance.
best regards,
Mamun

Jan 30 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You can find a lot of examples here:

http://msdn2.microsoft.com/en-us/data/aa937711.aspx
http://samples.gotdotnet.com/quickst...sOverview.aspx
http://quickstarts.asp.net/QuickStar.../gridview.aspx

Also, I think you don't need two queries. Just run the select query and
check if the result contains records or not.
If you are using ASP.NET, you might be able to do it without writing code
(or almost).
"mamun" <ma******@hotmail.comha scritto nel messaggio
news:11**********************@j27g2000cwj.googlegr oups.com...
Hi All,

I am doing it for the first time in C# (using Visual Studio 2005),

First I need to check if data exists in a table for a variable. If so
then run the second query and display the resultsets in Gridview.

For ex., in the form I am entering contract id and running the query
for that contract id. If results found then use that contract id to
run the second query and show the results in gridview.

My question is how I can accomplish that?
I do appreciate your help.

Thanks a ton in advance.
best regards,
Mamun

Jan 30 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.