Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to put my sql request within an application to disaply result? Expand / Collapse
Author
Message
Posted Monday, February 25, 2013 8:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 5, 2013 10:10 AM
Points: 17, Visits: 30
Hi i have some request i would like to put them in one application so it's can display all the result instead of going each time to the database

Do you have any example how to put my request?is it vb programming?visual studio?
can someone give me a tutorial or example of a application?

thanks

Post #1423638
Posted Monday, February 25, 2013 9:09 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 8:15 AM
Points: 224, Visits: 892
Might get you started...

http://www.dotnetperls.com/sqlclient



'Only he who wanders finds new paths'
Post #1423653
Posted Monday, February 25, 2013 9:09 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, December 19, 2014 2:05 PM
Points: 13,327, Visits: 12,820
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1423654
Posted Monday, February 25, 2013 9:35 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 5, 2013 10:10 AM
Points: 17, Visits: 30
Sean Lange (2/25/2013)
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?


Hi exactly

In fact instead of going to sql management studio and execute a new request everytime

i would like to put a list of request in a application and execute the request by pressing a button it will display the resulat

but all my queries are counting
for example how many poeple i have in my database i click on the button it 's shows 100

simple things, instead of going to the sql studio and executing the request and opening a new frame for each request etc...


thanks
Post #1423667
Posted Monday, February 25, 2013 10:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, December 19, 2014 2:05 PM
Points: 13,327, Visits: 12,820
asco5 (2/25/2013)
Sean Lange (2/25/2013)
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?


Hi exactly

In fact instead of going to sql management studio and execute a new request everytime

i would like to put a list of request in a application and execute the request by pressing a button it will display the resulat

but all my queries are counting
for example how many poeple i have in my database i click on the button it 's shows 100

simple things, instead of going to the sql studio and executing the request and opening a new frame for each request etc...


thanks


Your issue is still very vague but basically you can create a stored proc, then create an application that calls that stored proc and displays the results.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1423698
Posted Tuesday, February 26, 2013 4:03 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 5, 2013 10:10 AM
Points: 17, Visits: 30
Sean Lange (2/25/2013)
asco5 (2/25/2013)
Sean Lange (2/25/2013)
Your question is unclear. Are you trying to create an application that will dynamically display the results of a query?


Hi exactly

In fact instead of going to sql management studio and execute a new request everytime

i would like to put a list of request in a application and execute the request by pressing a button it will display the resulat

but all my queries are counting
for example how many poeple i have in my database i click on the button it 's shows 100

simple things, instead of going to the sql studio and executing the request and opening a new frame for each request etc...


thanks


Your issue is still very vague but basically you can create a stored proc, then create an application that calls that stored proc and displays the results.



hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result


  Post Attachments 
EXEMPLE.gif (12 views, 59.92 KB)
Post #1423989
Posted Wednesday, February 27, 2013 8:09 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, December 19, 2014 2:05 PM
Points: 13,327, Visits: 12,820
asco5 (2/26/2013)

hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result


OK so again here are the steps.

1) Create a stored proc that retrieves your data. (or maybe more than 1 stored proc)
2) Call this stored proc from your application.
3) Display the results in your application.



_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1424556
Posted Wednesday, February 27, 2013 5:39 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 5, 2013 10:10 AM
Points: 17, Visits: 30
Sean Lange (2/27/2013)
asco5 (2/26/2013)

hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result


OK so again here are the steps.

1) Create a stored proc that retrieves your data. (or maybe more than 1 stored proc)
2) Call this stored proc from your application.
3) Display the results in your application.



Hi thanks for your useful reply

But i m beginner i know that i have to store all my proc, and call from my application and display the result
but how?can i have 1 exemple of 1 proc how it's done so i can work on it to do all the rest of my requests?

thanks
Post #1424827
Posted Thursday, February 28, 2013 7:16 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, December 19, 2014 2:05 PM
Points: 13,327, Visits: 12,820
asco5 (2/27/2013)
Sean Lange (2/27/2013)
asco5 (2/26/2013)

hi thanks for your reply
this is a example of what i want to do
as you see i have my data base and i have my application
i would like to add all my sql request in my application and add a button to execute all the request and shows the result


OK so again here are the steps.

1) Create a stored proc that retrieves your data. (or maybe more than 1 stored proc)
2) Call this stored proc from your application.
3) Display the results in your application.



Hi thanks for your useful reply

But i m beginner i know that i have to store all my proc, and call from my application and display the result
but how?can i have 1 exemple of 1 proc how it's done so i can work on it to do all the rest of my requests?

thanks


Let's use the first of your outputs "how many person who have 100 MARKS"

To make this a little more flexible we will use a parameter.

Something like this:

create proc GetHighMarks
(
@MarkMin int
) as
select count(*) from YourTable
where Marks >= @MarkMin



_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1425035
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse